nixos/vaultwarden: fix race with backup

when vaultwarden starts while backup-vaultwarden.service is running, it
fails because the sqlite database is locked
This commit is contained in:
Guillaume Girol 2022-09-04 12:00:00 +00:00
parent 7d009061c9
commit 7160e94e27

View file

@ -210,6 +210,8 @@ ADMIN_TOKEN=...copy-paste a unique generated secret token here...
BACKUP_FOLDER = cfg.backupDir;
};
path = with pkgs; [ sqlite ];
# if both services are started at the same time, vaultwarden fails with "database is locked"
before = [ "vaultwarden.service" ];
serviceConfig = {
SyslogIdentifier = "backup-vaultwarden";
Type = "oneshot";