46 lines
1,013 B
Nix
Executable file
46 lines
1,013 B
Nix
Executable file
{...}: let
|
|
host = "127.0.0.1";
|
|
port = 6969;
|
|
in {
|
|
services.forgejo = {
|
|
enable = true;
|
|
|
|
lfs.enable = true;
|
|
database.type = "postgres";
|
|
|
|
settings = {
|
|
DEFAULT = {
|
|
APP_NAME = "An idiot admires complexity. A genius admires simplicity";
|
|
};
|
|
|
|
server = {
|
|
DOMAIN = "git.spoodythe.one";
|
|
HTTP_PORT = port;
|
|
ROOT_URL = "https://git.spoodythe.one";
|
|
};
|
|
|
|
service.DISABLE_REGISTRATION = true;
|
|
actions = {
|
|
ENABLED = true;
|
|
DEFAULT_ACTIONS_URL = "https://code.forgejo.org";
|
|
};
|
|
federation.ENABLED = false;
|
|
};
|
|
};
|
|
|
|
services.nginx.virtualHosts."git.spoodythe.one" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://${host}:${toString port}";
|
|
extraConfig = ''
|
|
client_max_body_size 100M;
|
|
'';
|
|
};
|
|
};
|
|
|
|
# Open port 80 and 443 for reverse proxy
|
|
networking.firewall.allowedTCPPorts = [80 443];
|
|
networking.firewall.allowedUDPPorts = [80 443];
|
|
}
|