refactor: split server modules into smaller more manageable files
This commit is contained in:
parent
b2e5ae1f98
commit
cdeb4e108b
49 changed files with 1519 additions and 1270 deletions
18
modules/nixos-modules/server/forgejo/proxy.nix
Normal file
18
modules/nixos-modules/server/forgejo/proxy.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
const = import ./const.nix;
|
||||
httpPort = const.httpPort;
|
||||
in {
|
||||
config = lib.mkIf (config.services.forgejo.enable && config.host.reverse_proxy.enable) {
|
||||
host.reverse_proxy.subdomains.${config.services.forgejo.subdomain} = {
|
||||
target = "http://localhost:${toString httpPort}";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
config.services.forgejo.settings.server.SSH_LISTEN_PORT
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue