initial server config

This commit is contained in:
Daniel Kauss Serna 2026-02-03 13:22:21 +01:00
commit 8f6d63909a
10 changed files with 313 additions and 0 deletions

39
services/backup.nix Normal file
View file

@ -0,0 +1,39 @@
{ config, pkgs, ... }:
{
services.postgresql.backup = {
enable = true;
location = "/var/lib/data/backups/postgres";
databases = [ "immich" "paperless" "nextcloud" "vaultwarden" ];
};
services.borgbackup.jobs."daily-backup" = {
paths = [
"/var/lib/data"
"/var/lib/vaultwarden"
"/etc/nixos"
];
exclude = [
"**/cache"
"**/.cache"
"/var/lib/data/immich/thumbs"
];
repo = "/var/lib/backup/borg-repo";
encryption.mode = "none";
compression = "zstd,1";
startAt = "daily";
prune.keep = {
within = "1d";
daily = 7;
weekly = 4;
monthly = 6;
};
};
}