Unverified Commit f7e134de authored by Chris Kruining's avatar Chris Kruining Committed by Chris Kruining
Browse files

nixos/lanraragi: add openFirewall option

Makes it easier to set up the service, many other services offer this option
parent 43c2a5ee
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@ in
        description = "Port for LANraragi's web interface.";
      };

      openFirewall = lib.mkEnableOption "" // {
        description = "Open ports in the firewall for the Radarr web interface.";
      };

      passwordFile = lib.mkOption {
        type = lib.types.nullOr lib.types.path;
        default = null;
@@ -103,5 +107,9 @@ in
          EOF
        '';
    };

    networking.firewall = lib.mkIf cfg.openFirewall {
      allowedTCPPorts = [ cfg.port ];
    };
  };
}