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:
@@ -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 = [
|
||||||
|
|||||||
Reference in New Issue
Block a user