diff --git a/systems/zaatar/configuration.nix b/systems/zaatar/configuration.nix index 18d34cf..02af140 100644 --- a/systems/zaatar/configuration.nix +++ b/systems/zaatar/configuration.nix @@ -45,7 +45,7 @@ in { restic.file = ../../secrets/restic.age; }; - services.restic.backups.moodle-dl = { + services.restic.backups.niveum = { initialize = true; inherit (restic) repository; timerConfig = { diff --git a/systems/zaatar/home-assistant.nix b/systems/zaatar/home-assistant.nix index efe9202..d5eaa82 100644 --- a/systems/zaatar/home-assistant.nix +++ b/systems/zaatar/home-assistant.nix @@ -1,5 +1,6 @@ -let +{config, ...}: let port = 8123; + inherit (import ../../lib) restic; in { networking.firewall.allowedTCPPorts = [port]; @@ -9,6 +10,19 @@ in { }; }; + services.restic.backups.niveum = { + initialize = true; + inherit (restic) repository; + timerConfig = { + OnCalendar = "daily"; + RandomizedDelaySec = "1h"; + }; + passwordFile = config.age.secrets.restic.path; + paths = [ + "/var/lib/containers/storage/volumes/home-assistant.bak/_data/backups" + ]; + }; + virtualisation.oci-containers = { backend = "podman"; containers.homeassistant = {