refactor: moved reverse proxy into own section in server modules

This commit is contained in:
Leyla Becker 2025-09-14 22:10:57 -05:00
parent 663bdcc012
commit 52801b4bb7
7 changed files with 142 additions and 119 deletions

View file

@ -26,9 +26,6 @@ in {
}
];
host = {
reverse_proxy.subdomains.${config.services.forgejo.subdomain} = {
target = "http://localhost:${toString forgejoPort}";
};
postgres = {
enable = true;
extraUsers = {
@ -76,6 +73,13 @@ in {
config.services.forgejo.settings.server.SSH_LISTEN_PORT
];
}
(lib.mkIf config.host.reverse_proxy.enable {
host = {
reverse_proxy.subdomains.${config.services.forgejo.subdomain} = {
target = "http://localhost:${toString forgejoPort}";
};
};
})
(lib.mkIf config.services.fail2ban.enable {
environment.etc = {
"fail2ban/filter.d/forgejo.local".text = lib.mkIf config.services.forgejo.enable (