Unverified Commit cc1fdc53 authored by Fabián Heredia Montiel's avatar Fabián Heredia Montiel Committed by GitHub
Browse files

Merge pull request #254181 from StillerHarpo/adguardhome

nixos/adguardhome: Fix openFirewall
parents 3710b38c 20acd199
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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 ];
  };
}
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
    emptyConf = { lib, ... }: {
      services.adguardhome = {
        enable = true;
        settings = {};
      };
    };