Clean up montalin configuration
This commit is contained in:
parent
8424e0875c
commit
4c5c5a42ca
8 changed files with 156 additions and 106 deletions
34
host/montalin/backup.nix
Normal file
34
host/montalin/backup.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let mountService = "var-backup.mount";
|
||||
repo = "/var/backup/montalin"; # TODO: Does this make sense?
|
||||
{
|
||||
services.borgbackup.jobs = rec {
|
||||
data = {
|
||||
exclude = [
|
||||
"/var/backup" #TODO: Does this make sense?
|
||||
"/var/tmp"
|
||||
"/var/cache"
|
||||
];
|
||||
paths = [
|
||||
"/etc"
|
||||
"/home"
|
||||
"/root"
|
||||
"/var"
|
||||
];
|
||||
preHook = "systemctl mount ${mountService}";
|
||||
postHook = "systemctl stop ${mountService}";
|
||||
prune.keep = {
|
||||
within = "14d";
|
||||
weekly = 4;
|
||||
monthly 6;
|
||||
yearly = -1;
|
||||
|
||||
};
|
||||
removeableDevices = true;
|
||||
repo = repo;
|
||||
startAt = ; #TODO: systemdtime
|
||||
environment.BORG_BASE_DIR="${repo}/borg-base-dir";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue