74 lines
1.8 KiB
Nix
74 lines
1.8 KiB
Nix
{ config, lib, ... }: {
|
|
|
|
services.nginx = {
|
|
enable = true;
|
|
statusPage = true;
|
|
virtualHosts = {
|
|
"git.${config.networking.hostName}.private" = {
|
|
locations."/" = {
|
|
proxyPass = "http://${config.networking.hostName}.private:${
|
|
toString config.services.gogs.httpPort
|
|
}";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
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
|
|
|
|
[log.file]
|
|
LEVEL = Warn
|
|
|
|
[log.console]
|
|
LEVEL = Warn
|
|
|
|
[log.sublogger.macaron]
|
|
LEVEL = Warn
|
|
'';
|
|
};
|
|
backup.all.restic.dirs = [ config.services.gogs.repositoryRoot ];
|
|
|
|
|
|
#services.gitea = {
|
|
# enable = true;
|
|
# appName = "Git";
|
|
# domain = "git.ingolf-wagner.de";
|
|
# httpPort = 3000;
|
|
# repositoryRoot = "/home/gitea/repositories";
|
|
# stateDir = "/home/gitea";
|
|
# 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
|
|
|
|
# [log]
|
|
# LEVEL = Warn
|
|
# [log.sublogger.macaron]
|
|
# LEVEL = Warn
|
|
# '';
|
|
#};
|
|
#backup.all.restic.dirs = [ config.services.gitea.repositoryRoot ];
|
|
|
|
}
|