diff --git a/nixos/modules/services/security/vaultwarden/default.nix b/nixos/modules/services/security/vaultwarden/default.nix index d95a19a5fac7..11d49b580b31 100644 --- a/nixos/modules/services/security/vaultwarden/default.nix +++ b/nixos/modules/services/security/vaultwarden/default.nix @@ -168,7 +168,7 @@ in { message = "Backups for database backends other than sqlite will need customization"; } { - assertion = !(lib.hasPrefix dataDir cfg.backupDir); + assertion = cfg.backupDir != null -> !(lib.hasPrefix dataDir cfg.backupDir); message = "Backup directory can not be in ${dataDir}"; } ];