nixos-config/configs/workhorse/gogs.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

2019-12-20 05:54:26 +01:00
{ config, lib, ... }: {
2019-10-24 02:20:38 +02:00
services.nginx = {
enable = true;
statusPage = true;
virtualHosts = {
"gogs.${config.networking.hostName}.private" = {
2019-12-20 05:54:26 +01:00
serverAliases = [ "git.${config.networking.hostName}.private" ];
2019-10-24 02:20:38 +02:00
locations."/" = {
2019-12-20 05:54:26 +01:00
proxyPass = "http://${config.networking.hostName}.private:${
toString config.services.gogs.httpPort
}";
2019-10-24 02:20:38 +02:00
};
};
};
};
services.gogs = {
enable = true;
appName = "Kruck GoGs";
domain = "git.ingolf-wagner.de";
httpPort = 3000;
repositoryRoot = "/home/gogs/repositories";
stateDir = "/home/gogs";
rootUrl = "https://git.ingolf-wagner.de/";
extraConfig = ''
[service]
DISABLE_REGISTRATION = true
SHOW_REGISTRATION_BUTTON = false
[server]
SSH_DOMAIN = "git.ingolf-wagner.de"
SSH_PORT = 443
START_SSH_SERVER = true
SSH_LISTEN_PORT = 2222
2020-04-02 08:53:51 +02:00
[log]
; Either "Trace", "Info", "Warn", "Error", "Fatal", default is "Trace"
LEVEL = Warn
2019-12-20 05:54:26 +01:00
'';
2019-10-24 02:20:38 +02:00
};
backup.all.restic.dirs = [ config.services.gogs.repositoryRoot ];
}