Merge pull request #254181 from StillerHarpo/adguardhome

nixos/adguardhome: Fix openFirewall
This commit is contained in:
Fabián Heredia Montiel 2023-09-12 16:23:16 -05:00 committed by GitHub
commit cc1fdc5376
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -17,6 +17,7 @@ let
text = builtins.toJSON cfg.settings;
checkPhase = "${pkgs.adguardhome}/bin/adguardhome -c $out --check-config";
};
defaultBindPort = 3000;
in
{
@ -86,7 +87,7 @@ in
'';
};
bind_port = mkOption {
default = 3000;
default = defaultBindPort;
type = port;
description = lib.mdDoc ''
Port to serve HTTP pages on.
@ -169,6 +170,6 @@ in
};
};
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.settings.bind_port ];
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.settings.bind_port or defaultBindPort ];
};
}

View file

@ -7,7 +7,6 @@
emptyConf = { lib, ... }: {
services.adguardhome = {
enable = true;
settings = {};
};
};