From e651c1a4e91ddaf1f93cfd7f9b9124ebfb8bca0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 3 Jun 2024 00:18:25 +0200 Subject: [PATCH] Add backup-helper to ha1 --- flake.nix | 1 + hosts/ha1/configuration.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/flake.nix b/flake.nix index 56a3a84..8778d9f 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,7 @@ ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./hosts/ha1 sops-nix.nixosModules.sops + backup-helper.nixosModules.backup-helper ]; }; template1 = nixpkgs.lib.nixosSystem { diff --git a/hosts/ha1/configuration.nix b/hosts/ha1/configuration.nix index 102e728..b190f25 100644 --- a/hosts/ha1/configuration.nix +++ b/hosts/ha1/configuration.nix @@ -44,6 +44,18 @@ git ]; + # Backup service dirs + sops.secrets."backup_helper_secret" = { }; + backup-helper = { + enable = true; + password-file = "/run/secrets/backup_helper_secret"; + backup-dirs = [ + "/var/lib/hass" + "/var/lib/zigbee2mqtt" + "/var/lib/mosquitto" + ]; + }; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];