nixos/lanraragi: add openFirewall option
Makes it easier to set up the service, many other services offer this option
This commit is contained in:
committed by
Chris Kruining
parent
43c2a5ee13
commit
f7e134def9
@@ -22,6 +22,10 @@ in
|
|||||||
description = "Port for LANraragi's web interface.";
|
description = "Port for LANraragi's web interface.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
openFirewall = lib.mkEnableOption "" // {
|
||||||
|
description = "Open ports in the firewall for the Radarr web interface.";
|
||||||
|
};
|
||||||
|
|
||||||
passwordFile = lib.mkOption {
|
passwordFile = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
default = null;
|
default = null;
|
||||||
@@ -103,5 +107,9 @@ in
|
|||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||||
|
allowedTCPPorts = [ cfg.port ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user