Skip to content

Commit

Permalink
nixos/navidrome: add openFirewall option
Browse files Browse the repository at this point in the history
This adds an option to the navidrome module to open the configured TCP
port in the firewall.
  • Loading branch information
n8henrie committed Nov 13, 2023
1 parent 96e8601 commit bf22b65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nixos/modules/services/audio/navidrome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
Expand Down

0 comments on commit bf22b65

Please sign in to comment.