0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/octoprint: add openFirewall option

This commit is contained in:
Felix Buehler 2022-11-13 18:14:02 +01:00
parent 40b71c3e93
commit 6de9ec5969

View file

@ -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 ];
};
}