nixos-config/mastus/gogs.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

2015-10-18 14:25:54 +02:00
{ config, pkgs, ... }:
{
2018-03-10 16:27:04 +01:00
users.extraUsers.git = { home = config.services.gogs.stateDir; extraGroups = [ "git" ]; };
2015-10-18 14:25:54 +02:00
users.extraGroups.git = { };
2018-03-10 16:27:04 +01:00
services.gogs = rec {
enable = true;
stateDir = "/srv/git.gebner.org";
user = "git";
group = "git";
appName = "Gabriel Ebner's git server";
domain = "git.gebner.org";
rootUrl = "https://git.gebner.org/";
httpPort = 8001;
cookieSecure = true;
extraConfig = ''
[picture]
DISABLE_GRAVATAR = false
AVATAR_UPLOAD_PATH = ${stateDir}/data/avatars
[log]
ROOT_PATH = ${stateDir}/logs
MODE = file
LEVEL = Info
[service]
DISABLE_REGISTRATION = true
'';
2015-10-18 14:25:54 +02:00
};
2019-08-25 18:04:33 +02:00
services.nginx = {
recommendedProxySettings = true;
virtualHosts."git.gebner.org" = {
forceSSL = true;
useACMEHost = "gebner.org";
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.gogs.httpPort}";
extraConfig = ''
proxy_buffering off;
client_max_body_size 30M;
'';
};
};
};
2015-10-18 14:25:54 +02:00
}