commit ffed207fcf96dfe4bcc425c3a81782424846e8e8
parent 7bcdc7435759ec603f5e087a22efcd9ce2c80f96
Author: Katja (zaphyra) <git@ctu.cx>
Date: Fri, 6 Jun 2025 19:04:12 +0200
parent 7bcdc7435759ec603f5e087a22efcd9ce2c80f96
Author: Katja (zaphyra) <git@ctu.cx>
Date: Fri, 6 Jun 2025 19:04:12 +0200
config/nixos/presets/katja/smarthome: add impermanence
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/config/nixos/modules/filesystem/impermanence.nix b/config/nixos/modules/filesystem/impermanence.nix @@ -126,6 +126,7 @@ in ''; }; }; + environment.persistence."/nix/persist/system" = { enable = true; hideMounts = true; @@ -137,7 +138,7 @@ in ] ++ cfg.system.dirs; files = [ "/etc/machine-id" - ] ++cfg.system.files; + ] ++ cfg.system.files; }; #katja: hack to persist `/var/lib/private/<service>` (see https://github.com/nix-community/impermanence/issues/213)
diff --git a/config/nixos/modules/presets/katja/smarthome/influxdb2.nix b/config/nixos/modules/presets/katja/smarthome/influxdb2.nix @@ -21,6 +21,15 @@ in config = lib.mkIf cfg { dns.zones."zaphyra.eu".subdomains."influx.home.infra".AAAA = [ hostConfig.networking.ip6Address ]; + modules.filesystem.impermanence.system.dirs = [ + { + directory = "/var/lib/influxdb2"; + mode = "0770"; + user = "influxdb2"; + group = "influxdb2"; + } + ]; + sops.secrets = { "resticPasswords/influxdb2" = { }; "environments/influxdb2" = { };
diff --git a/config/nixos/modules/presets/katja/smarthome/zigbee2mqtt.nix b/config/nixos/modules/presets/katja/smarthome/zigbee2mqtt.nix @@ -24,6 +24,15 @@ in hostConfig.networking.ip6Address ]; + modules.filesystem.impermanence.system.dirs = [ + { + directory = "/var/lib/zigbee2mqtt"; + mode = "0770"; + user = "zigbee2mqtt"; + group = "zigbee2mqtt"; + } + ]; + sops.secrets."zigbee2mqttSecrets.yaml" = { owner = "zigbee2mqtt"; key = "zigbee2mqttSecrets";