Setup backups on odyssey

This commit is contained in:
Jordan Holt 2023-12-03 21:59:56 +00:00
parent bbf835d127
commit 1aab626f17
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520

View File

@ -69,6 +69,36 @@ with lib.my;
};
};
age.secrets."odyssey_borg_passphrase" = {
file = ../../secrets/odyssey_borg_passphrase.age;
};
services.borgmatic = {
enable = true;
settings = {
location = {
source_directories = [
"/home/jordan/Documents"
];
repositories = [
"ssh://iqwu22oq@iqwu22oq.repo.borgbase.com/./repo"
];
};
storage = {
encryption_passcommand = "cat ${config.age.secrets.odyssey_borg_passphrase.path}";
ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key";
};
retention = {
keep_daily = 7;
keep_weekly = 4;
keep_monthly = 6;
};
};
};
# Without this override, `cat` is unavailable for `encryption_passcommand`
systemd.services.borgmatic.confinement.fullUnit = true;
modules = {
desktop = {
apps.qbittorrent.enable = true;