Commit 6de9ec59 authored by Felix Buehler's avatar Felix Buehler
Browse files

nixos/octoprint: add openFirewall option

parent 40b71c3e
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 ];
  };

}