sets up vaultwarden backup
This commit is contained in:
parent
1a6aa16251
commit
cc6518a847
2 changed files with 26 additions and 2 deletions
|
|
@ -115,6 +115,7 @@
|
|||
wget
|
||||
docker-compose
|
||||
actual-server
|
||||
restic
|
||||
];
|
||||
|
||||
# Programs
|
||||
|
|
@ -160,6 +161,26 @@
|
|||
'';
|
||||
};
|
||||
|
||||
# Restic
|
||||
services.restic.backups.dnsc-vps-sm-backup = {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets."restic/password".path;
|
||||
repository = "sftp:dnsc-storage:restic/dnsc-vps-sm";
|
||||
paths = [
|
||||
"/var/backup/vaultwarden"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-daily 1"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 5"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Environment variables
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
{
|
||||
config, ...
|
||||
}: {
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
environmentFile = config.age.secrets."vaultwarden/env".path;
|
||||
backupDir = "/var/backup/vaultwarden";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue