From b6cf0d4998f3c274611b3106ea6b95d46d680cc5 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet Date: Tue, 31 Mar 2026 22:38:49 +0200 Subject: [PATCH] nixos/sonarr: fix unit: RequiresMountsFor for data directory This helps correctness for systems which need to mount particular directories (impermanence, preservation). This option has no effect if the system does not need to mount directories / if no mountpoints exist for this directory or its parents. Signed-off-by: Nicolas Dumazet --- nixos/modules/services/misc/servarr/sonarr.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/misc/servarr/sonarr.nix b/nixos/modules/services/misc/servarr/sonarr.nix index 283eac6b3d3b..a54d00097dd8 100644 --- a/nixos/modules/services/misc/servarr/sonarr.nix +++ b/nixos/modules/services/misc/servarr/sonarr.nix @@ -124,6 +124,7 @@ in // lib.optionalAttrs (cfg.dataDir == "/var/lib/sonarr/.config/NzbDrone") { StateDirectory = "sonarr"; }; + unitConfig.RequiresMountsFor = [ cfg.dataDir ]; }; networking.firewall = lib.mkIf cfg.openFirewall {