From e27ecbb13a86f04404afe0e41dc218e9ec7c4424 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sat, 30 Nov 2024 18:53:07 -0800 Subject: [PATCH] fix(sonarr): disable if insecure --- nixos/sonarr.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/sonarr.nix b/nixos/sonarr.nix index 7f45c835..8ac7c1dd 100644 --- a/nixos/sonarr.nix +++ b/nixos/sonarr.nix @@ -1,6 +1,10 @@ -_: { +{config, lib, ...}: let + inherit (lib.modules) mkIf mkDefault; + cfg = config.services.sonarr; + available = cfg.package.meta.available && cfg.package.dotnet-runtime.meta.available or true; +in { services.sonarr = { - enable = true; + enable = mkIf available (mkDefault true); }; users.users.sonarr.extraGroups = ["kyuuto"]; }