diff --git a/hosts/common/programs/smartmontools.nix b/hosts/common/programs/smartmontools.nix index 9f9a94ba3..efdf6ebb7 100644 --- a/hosts/common/programs/smartmontools.nix +++ b/hosts/common/programs/smartmontools.nix @@ -54,7 +54,9 @@ in # keep "@privileged" or "@raw-io", since it needs to do that ]; # serviceConfig.RestrictNamespaces = true; - serviceConfig.ReadWritePaths = "/var/lib/postfix/queue/maildrop"; + serviceConfig.ReadWritePaths = lib.mkIf config.services.postfix.enable [ + "/var/lib/postfix/queue/maildrop" + ]; # serviceConfig.PrivateUsers = true; # can't, because it requires CAP_SYS_RAWIO }; }