46 lines
902 B
Nix
Executable file
46 lines
902 B
Nix
Executable file
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: 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 = "http://${host}:${toString port}";
|
|
};
|
|
|
|
service.DISABLE_REGISTRATION = true;
|
|
actions = {
|
|
ENABLED = true;
|
|
DEFAULT_ACTIONS_URL = "https://code.forgejo.org";
|
|
};
|
|
federation.ENABLED = false;
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [port];
|
|
networking.firewall.allowedUDPPorts = [port];
|
|
|
|
services.caddy = {
|
|
enable = true;
|
|
virtualHosts."git.spoodythe.one".extraConfig = ''
|
|
reverse_proxy * ${host}:${toString port}
|
|
'';
|
|
};
|
|
}
|