add borg backup to thinkpad
This commit is contained in:
parent
9c417b7ca9
commit
c1f04d030d
1 changed files with 28 additions and 1 deletions
|
|
@ -7,7 +7,7 @@
|
|||
../../../modules/gnome/system.nix
|
||||
../../../modules/tailscale.nix
|
||||
../../../modules/login-display.nix
|
||||
../../../modules/borg/server.nix
|
||||
../../../modules/borg/client.nix
|
||||
../../../modules/logiops.nix
|
||||
];
|
||||
|
||||
|
|
@ -242,6 +242,33 @@
|
|||
"/dev/nvme0n1" = "System_SSD";
|
||||
};
|
||||
showDiskUsage = true;
|
||||
showBorgStatus = true;
|
||||
};
|
||||
|
||||
# Borg backup configuration
|
||||
services.borg-client-custom = {
|
||||
enable = true;
|
||||
repositoryUrl = "ssh://backup-box/./thinkpad";
|
||||
backupPaths = [
|
||||
"/home/yanlin/Archive"
|
||||
"/home/yanlin/Credentials"
|
||||
"/home/yanlin/Documents"
|
||||
];
|
||||
backupFrequency = "*-*-* 00:00:00";
|
||||
retention = {
|
||||
keepDaily = 7;
|
||||
keepWeekly = 4;
|
||||
keepMonthly = 6;
|
||||
keepYearly = 2;
|
||||
};
|
||||
passphraseFile = "/etc/borg-passphrase";
|
||||
|
||||
preHook = ''
|
||||
echo "$(date): Starting Borg backup of ${config.networking.hostName}"
|
||||
'';
|
||||
postHook = ''
|
||||
echo "$(date): Borg backup of ${config.networking.hostName} completed successfully"
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue