mini-2024-12-03-20-29-57
This commit is contained in:
44
configs/borg.nix
Normal file
44
configs/borg.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{config, ...}: {
|
||||
sops = {
|
||||
secrets = {
|
||||
borg-key = {
|
||||
owner = config.users.users.alex.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
borgbackup.jobs.all = rec {
|
||||
compression = "auto,zstd";
|
||||
encryption = {
|
||||
mode = "repokey-blake2";
|
||||
passCommand = "cat ${config.sops.secrets.borg-key.path}";
|
||||
};
|
||||
extraCreateArgs = "--stats --verbose --checkpoint-interval=600 --exclude-caches";
|
||||
extraPruneArgs = [
|
||||
"--save-space"
|
||||
"--stats"
|
||||
];
|
||||
extraCompactArgs = [
|
||||
"--cleanup-commits"
|
||||
];
|
||||
environment = {
|
||||
BORG_RSH = "ssh -i /home/alex/.ssh/id_borg_ed25519";
|
||||
BORG_BASE_DIR = "/persist/borg";
|
||||
};
|
||||
readWritePaths = ["/persist/borg"];
|
||||
paths = ["/home/alex" "/persist"];
|
||||
startAt = "daily";
|
||||
prune.keep = {
|
||||
daily = 7;
|
||||
weekly = 4;
|
||||
monthly = 6;
|
||||
};
|
||||
exclude = [
|
||||
"/home/alex/mounted"
|
||||
"/home/alex/.cache"
|
||||
"/persist/borg"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../configs/common.nix
|
||||
./configs/common.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
@ -16,7 +16,7 @@
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
configurationLimit = 5;
|
||||
configurationLimit = 10;
|
||||
enableCryptodisk = true;
|
||||
useOSProber = true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user