From 426afbc9cdfb21705e9c125c7af0dbfcc85de4ca Mon Sep 17 00:00:00 2001 From: blake Date: Tue, 7 Oct 2025 01:07:30 -0500 Subject: [PATCH] 20 current 2025-10-07 00:49:35 25.05.20251001.5b5be50 6.12.49 * --- hosts/snowbelle/configuration.nix | 1 + modules/homelab/services/arr/sonarr/default.nix | 7 ++++--- modules/homelab/services/default.nix.template | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hosts/snowbelle/configuration.nix b/hosts/snowbelle/configuration.nix index 97064b8..869392e 100644 --- a/hosts/snowbelle/configuration.nix +++ b/hosts/snowbelle/configuration.nix @@ -28,6 +28,7 @@ services = { jellyfin.enable = true; sonarr.enable = true; + sonarr.port = 7105; }; }; diff --git a/modules/homelab/services/arr/sonarr/default.nix b/modules/homelab/services/arr/sonarr/default.nix index f9b7104..6c6656b 100644 --- a/modules/homelab/services/arr/sonarr/default.nix +++ b/modules/homelab/services/arr/sonarr/default.nix @@ -3,6 +3,7 @@ let cfg = config.modules.services.sonarr; ids = lib.mkForce 2005; + default_port = 8989; in { options.modules.services.sonarr = { @@ -10,8 +11,8 @@ in port = lib.mkOption { type = lib.types.int; - default = 7105; - description = "set port for sonarr"; + default = 8989; + description = "set port for sonarr (${toString default_port})"; }; }; @@ -48,7 +49,7 @@ in systemd.services.sonarr.serviceConfig = { UMask = lib.mkForce "0007"; }; # open firewall - #networking.firewall.allowedTCPPorts = [ 7105 ]; + #networking.firewall.allowedTCPPorts = [ cfg.port ]; # reverse proxy entryo services.nginx.virtualHosts."sonarr.snowbelle.lan" = { diff --git a/modules/homelab/services/default.nix.template b/modules/homelab/services/default.nix.template index c38b645..8fbbd62 100644 --- a/modules/homelab/services/default.nix.template +++ b/modules/homelab/services/default.nix.template @@ -3,6 +3,7 @@ let cfg = config.modules.services.; ids = ; + default_port = ; in { options.modules.services. = { @@ -11,8 +12,8 @@ in # set port options # port = lib.mkOption { # type = lib.types.int; -# default = ; -# description = "set port for (default: "; +# default = cfg.default_port; +# description = "set port for (default: ${toString default_port}"; # }; }; @@ -50,7 +51,7 @@ in systemd.services..serviceConfig = { UMask = lib.mkForce "0007"; }; # open firewall - #networking.firewall.allowedTCPPorts = [ ]; + #networking.firewall.allowedTCPPorts = [ port ]; # reverse proxy entryo services.nginx.virtualHosts.".snowbelle.lan" = { @@ -59,7 +60,7 @@ in sslCertificate = config.sops.secrets."ssl_blakedheld_crt".path; sslCertificateKey = config.sops.secrets."ssl_blakedheld_key".path; locations."/" = { - proxyPass = "http://127.0.0.1:"; + proxyPass = "http://127.0.0.1:${toString port}"; }; }; };