group options together

This commit is contained in:
goeranh 2026-02-27 19:55:59 +01:00
parent 815ecd972f
commit 5c82694beb
No known key found for this signature in database

View file

@ -28,60 +28,60 @@ in
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.hostName = "git"; networking = {
networking.interfaces.ens18.ipv4.addresses = [ hostName = "git";
{ interfaces.ens18.ipv4.addresses = [
address = "141.56.51.97"; {
prefixLength = 24; address = "141.56.51.97";
} prefixLength = 24;
]; }
];
networking.defaultGateway.address = "141.56.51.254"; defaultGateway.address = "141.56.51.254";
networking.nameservers = [ firewall.allowedTCPPorts = [
"9.9.9.9" 25
"1.1.1.1" 80
]; 443
597
];
};
services.openssh.enable = true; services = {
services.forgejo = { openssh.enable = true;
enable = true; forgejo = {
settings = { enable = true;
settings = {
server = { server = {
PROTOCOL = "http+unix"; PROTOCOL = "http+unix";
HTTP_ADDR = "/run/forgejo/forgejo.sock"; HTTP_ADDR = "/run/forgejo/forgejo.sock";
ROOT_URL = "https://${config.networking.fqdn}"; ROOT_URL = "https://${config.networking.fqdn}";
};
oauth2_client = {
ENABLE_AUTO_REGISTRATION = "true";
REGISTER_EMAIL_CONFIRM = "false";
username = "email";
};
service = {
SHOW_REGISTRATION_BUTTON = "false";
};
}; };
oauth2_client = { };
ENABLE_AUTO_REGISTRATION = "true";
REGISTER_EMAIL_CONFIRM = "false"; nginx = {
username = "email"; enable = true;
}; virtualHosts."${config.networking.fqdn}" = {
service = { forceSSL = true;
SHOW_REGISTRATION_BUTTON = "false"; enableACME = true;
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://unix:/run/forgejo/forgejo.sock";
};
}; };
}; };
}; };
services.nginx = {
enable = true;
virtualHosts."${config.networking.fqdn}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://unix:/run/forgejo/forgejo.sock";
};
};
};
networking.firewall.allowedTCPPorts = [
25
80
443
597
];
system.stateVersion = "24.11"; system.stateVersion = "24.11";