Setup restic backup service; enable postgresql for general use

This commit is contained in:
2024-08-14 22:19:20 -05:00
parent aa40c0c5e3
commit 06c4c7bc13
9 changed files with 72 additions and 13 deletions

28
nix/system/backups.nix Normal file
View File

@ -0,0 +1,28 @@
{ pkgs, config, ...}: {
services.restic.backups = {
daily = {
initialize = true;
environmentFile = config.age.secrets."restic/env".path;
passwordFile = config.age.secrets."restic/password".path;
repository = "s3:https://s3.amazonaws.com/matricxbackups";
paths = [
"${config.users.users.sezycei.home}/srv"
"${config.users.users.sezycei.home}/nix"
"${config.users.users.sezycei.home}/keys"
"${config.users.users.sezycei.home}/dev"
];
exclude = [
"*minecraft/OLD*"
];
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 12"
];
};
};
}