Fix everything.
This commit is contained in:
parent
11075719cb
commit
3d25d316fe
118 changed files with 180 additions and 244 deletions
39
system/services/server/forgejo/default.nix
Normal file
39
system/services/server/forgejo/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
config = lib.mkIf config.system.server.enable {
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
package = pkgs.forgejo;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.nixfox.ca";
|
||||
ROOT_URL = "https://git.nixfox.ca:443";
|
||||
HTTP_PORT = 3110;
|
||||
SSH_PORT = 2299;
|
||||
START_SSH_SERVER = true;
|
||||
};
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_ADDR = "mx.nixfox.ca";
|
||||
FROM = "NixFox Git <noreply@nixfox.ca>";
|
||||
USER = "noreply@nixfox.ca";
|
||||
PASSWD = config.secrets.noreplyPassword;
|
||||
PROTOCOL = "smtps";
|
||||
};
|
||||
service = {
|
||||
REGISTER_EMAIL_CONFIRM = true;
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
ui.DEFAULT_THEME = "forgejo-dark";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 2299 ];
|
||||
|
||||
services.cloudflare-dyndns.domains = [ "git.nixfox.ca" ];
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/forgejo" ];
|
||||
};
|
||||
}
|
11
system/services/server/forgejo/nginx/default.nix
Normal file
11
system/services/server/forgejo/nginx/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."git.nixfox.ca" = lib.mkIf config.services.forgejo.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3110";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue