nixos/navidrome: add openFirewall option

This adds an option to the navidrome module to open the configured TCP
port in the firewall.

authored by Nathan Henrie and committed by Bjørn Forsman 6c69d3c9 cd014bdb

+7
+7
nixos/modules/services/audio/navidrome.nix
··· 28 28 ''; 29 29 }; 30 30 31 + openFirewall = mkOption { 32 + type = types.bool; 33 + default = false; 34 + description = lib.mdDoc "Whether to open the TCP port in the firewall"; 35 + }; 31 36 }; 32 37 }; 33 38 34 39 config = mkIf cfg.enable { 40 + networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [cfg.settings.Port]; 41 + 35 42 systemd.services.navidrome = { 36 43 description = "Navidrome Media Server"; 37 44 after = [ "network.target" ];