From f7e134def959e06f0f2eed5a9d157aab8a5faa2a Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 2 Jul 2025 20:53:02 +0200 Subject: [PATCH] nixos/lanraragi: add openFirewall option Makes it easier to set up the service, many other services offer this option --- nixos/modules/services/web-apps/lanraragi.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/modules/services/web-apps/lanraragi.nix b/nixos/modules/services/web-apps/lanraragi.nix index 4c029d301827..1fbffa47238d 100644 --- a/nixos/modules/services/web-apps/lanraragi.nix +++ b/nixos/modules/services/web-apps/lanraragi.nix @@ -22,6 +22,10 @@ in description = "Port for LANraragi's web interface."; }; + openFirewall = lib.mkEnableOption "" // { + description = "Open ports in the firewall for the Radarr web interface."; + }; + passwordFile = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; @@ -103,5 +107,9 @@ in EOF ''; }; + + networking.firewall = lib.mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.port ]; + }; }; }