diff --git a/hosts/odyssey/default.nix b/hosts/odyssey/default.nix index a91581b..195b2ec 100644 --- a/hosts/odyssey/default.nix +++ b/hosts/odyssey/default.nix @@ -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;