diff options
author | Nathan Henrie <nate@n8henrie.com> | 2023-11-03 12:53:05 -0600 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2023-11-14 19:29:08 +0100 |
commit | 6c69d3c9caba58c8c9e2362419915a199403bdf6 (patch) | |
tree | bae731929fd328d6d0811c112752944f763502d0 /nixos/modules/services/audio | |
parent | cd014bdb858891bc7a3f0c1267ef8ad4fd11f19c (diff) | |
download | nixlib-6c69d3c9caba58c8c9e2362419915a199403bdf6.tar nixlib-6c69d3c9caba58c8c9e2362419915a199403bdf6.tar.gz nixlib-6c69d3c9caba58c8c9e2362419915a199403bdf6.tar.bz2 nixlib-6c69d3c9caba58c8c9e2362419915a199403bdf6.tar.lz nixlib-6c69d3c9caba58c8c9e2362419915a199403bdf6.tar.xz nixlib-6c69d3c9caba58c8c9e2362419915a199403bdf6.tar.zst nixlib-6c69d3c9caba58c8c9e2362419915a199403bdf6.zip |
nixos/navidrome: add openFirewall option
This adds an option to the navidrome module to open the configured TCP port in the firewall.
Diffstat (limited to 'nixos/modules/services/audio')
-rw-r--r-- | nixos/modules/services/audio/navidrome.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/services/audio/navidrome.nix b/nixos/modules/services/audio/navidrome.nix index e18e61eb6d44..77a0e74af9ca 100644 --- a/nixos/modules/services/audio/navidrome.nix +++ b/nixos/modules/services/audio/navidrome.nix @@ -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" ]; |