Merge pull request #189744 from symphorien/vaultwarden-service

nixos/vaultwarden: misc fixes

authored by

Guillaume Girol and committed by
GitHub
a47cfca9 730715f4

+4 -1
+4 -1
nixos/modules/services/security/vaultwarden/default.nix
··· 197 197 AmbientCapabilities = "CAP_NET_BIND_SERVICE"; 198 198 StateDirectory = "bitwarden_rs"; 199 199 StateDirectoryMode = "0700"; 200 + Restart = "always"; 200 201 }; 201 202 wantedBy = [ "multi-user.target" ]; 202 203 }; ··· 209 210 BACKUP_FOLDER = cfg.backupDir; 210 211 }; 211 212 path = with pkgs; [ sqlite ]; 213 + # if both services are started at the same time, vaultwarden fails with "database is locked" 214 + before = [ "vaultwarden.service" ]; 212 215 serviceConfig = { 213 216 SyslogIdentifier = "backup-vaultwarden"; 214 217 Type = "oneshot"; ··· 220 223 }; 221 224 222 225 systemd.timers.backup-vaultwarden = mkIf (cfg.backupDir != null) { 223 - aliases = [ "backup-bitwarden_rs.service" ]; 226 + aliases = [ "backup-bitwarden_rs.timer" ]; 224 227 description = "Backup vaultwarden on time"; 225 228 timerConfig = { 226 229 OnCalendar = mkDefault "23:00";