Unverified Commit d13437b0 authored by Ryan Lahfa's avatar Ryan Lahfa Committed by GitHub
Browse files

Merge pull request #201052 from Stunkymonkey/octoprint-firewall

nixos/octoprint: add openFirewall option
parents 5d87a1b9 6de9ec59
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -47,6 +47,12 @@ in
        '';
      };

      openFirewall = mkOption {
        type = types.bool;
        default = false;
        description = lib.mdDoc "Open ports in the firewall for OctoPrint.";
      };

      user = mkOption {
        type = types.str;
        default = "octoprint";
@@ -128,6 +134,6 @@ in
      };
    };

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

}