Setup restic backup service; enable postgresql for general use
This commit is contained in:
28
nix/system/backups.nix
Normal file
28
nix/system/backups.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user