diff options
author | Fabián Heredia Montiel <303897+fabianhjr@users.noreply.github.com> | 2023-09-12 16:23:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-12 16:23:16 -0500 |
commit | cc1fdc5376e56462f0618df7b8481d188b301798 (patch) | |
tree | 200dd41f8743fffa0c5516a1e58a0cf2e9b8434b /nixos/modules/services/networking | |
parent | 3710b38ccbef38e8c28b9584ea271f42524b29d6 (diff) | |
parent | 20acd199f4202da863f290b50345d30c85db913c (diff) | |
download | nixlib-cc1fdc5376e56462f0618df7b8481d188b301798.tar nixlib-cc1fdc5376e56462f0618df7b8481d188b301798.tar.gz nixlib-cc1fdc5376e56462f0618df7b8481d188b301798.tar.bz2 nixlib-cc1fdc5376e56462f0618df7b8481d188b301798.tar.lz nixlib-cc1fdc5376e56462f0618df7b8481d188b301798.tar.xz nixlib-cc1fdc5376e56462f0618df7b8481d188b301798.tar.zst nixlib-cc1fdc5376e56462f0618df7b8481d188b301798.zip |
Merge pull request #254181 from StillerHarpo/adguardhome
nixos/adguardhome: Fix openFirewall
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r-- | nixos/modules/services/networking/adguardhome.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/adguardhome.nix b/nixos/modules/services/networking/adguardhome.nix index 1701e5b439c1..399d838ccc69 100644 --- a/nixos/modules/services/networking/adguardhome.nix +++ b/nixos/modules/services/networking/adguardhome.nix @@ -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 ]; }; } |