diff --git a/nixos/common/backups.nix b/nixos/common/backups.nix new file mode 100644 index 0000000..a1474b6 --- /dev/null +++ b/nixos/common/backups.nix @@ -0,0 +1,11 @@ +{lib, ...}: let + inherit (lib) mkOption types; +in { + # Generic Backups. + options.foehammer.backups = { + paths = mkOption { + type = types.nullOr (types.listOf types.str); + default = []; + }; + }; +} diff --git a/nixos/common/services/vaultwarden.nix b/nixos/common/services/vaultwarden.nix index 1c0d5b4..6d4a092 100644 --- a/nixos/common/services/vaultwarden.nix +++ b/nixos/common/services/vaultwarden.nix @@ -43,6 +43,10 @@ in { SIGNUPS_ALLOWED = cfg.signups; }; + foehammer.backups.paths = [ + "/var/lib/bitwarden_rs" + ]; + environmentFile = cfg.envPath; }; }