1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(restic): backup whole hass volume

This commit is contained in:
2023-07-31 22:26:11 +02:00
parent 5876839e4d
commit 747402bca4

View File

@@ -1,6 +1,7 @@
{config, ...}: let {config, ...}: let
port = 8123; port = 8123;
inherit (import ../../lib) restic; inherit (import ../../lib) restic;
volumeName = "home-assistant.bak";
in { in {
networking.firewall.allowedTCPPorts = [port]; networking.firewall.allowedTCPPorts = [port];
@@ -19,14 +20,14 @@ in {
}; };
passwordFile = config.age.secrets.restic.path; passwordFile = config.age.secrets.restic.path;
paths = [ paths = [
"/var/lib/containers/storage/volumes/home-assistant.bak/_data/backups" "/var/lib/containers/storage/volumes/${volumeName}"
]; ];
}; };
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers.homeassistant = { containers.homeassistant = {
volumes = ["home-assistant.bak:/config"]; volumes = ["${volumeName}:/config"];
environment.TZ = "Europe/Berlin"; environment.TZ = "Europe/Berlin";
image = "ghcr.io/home-assistant/home-assistant:stable"; image = "ghcr.io/home-assistant/home-assistant:stable";
extraOptions = [ extraOptions = [