feat(void): backup system with borg
This commit is contained in:
parent
34b8009727
commit
8622ec301b
1 changed files with 34 additions and 0 deletions
34
void.nix
34
void.nix
|
|
@ -76,4 +76,38 @@
|
|||
wantedBy = [ "default.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
||||
};
|
||||
|
||||
# backup
|
||||
services.borgbackup.jobs."external" = {
|
||||
paths = [
|
||||
"/home"
|
||||
"/var"
|
||||
"/pile"
|
||||
];
|
||||
exclude = [
|
||||
"/home/*/.local/share/Steam"
|
||||
"**/*cache"
|
||||
"**/*Cache"
|
||||
"**/*trash"
|
||||
"**/*Trash"
|
||||
"/home/*/.mozilla/firefox"
|
||||
"/home/*/GOG Games"
|
||||
"**/target"
|
||||
"**/result"
|
||||
];
|
||||
repo = "/external/voidbackup";
|
||||
encryption = {
|
||||
mode = "repokey-blake2";
|
||||
passCommand = "cat /root/borgbackup/passphrase";
|
||||
};
|
||||
compression = "auto,lzma";
|
||||
startAt = "daily";
|
||||
persistentTimer = true;
|
||||
};
|
||||
systemd.services."borgbackup-job-external" = {
|
||||
unitConfig = {
|
||||
RequiresMountsFor = "/external";
|
||||
Requires = "external.mount";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue