mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
nixos/navidrome: add openFirewall option
This adds an option to the navidrome module to open the configured TCP port in the firewall.
This commit is contained in:
parent
cd014bdb85
commit
6c69d3c9ca
@ -28,10 +28,17 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc "Whether to open the TCP port in the firewall";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [cfg.settings.Port];
|
||||
|
||||
systemd.services.navidrome = {
|
||||
description = "Navidrome Media Server";
|
||||
after = [ "network.target" ];
|
||||
|
Loading…
Reference in New Issue
Block a user