From 2c2b24d0a9c85af0fddd425b28d62d35d04989d9 Mon Sep 17 00:00:00 2001 From: Gonne Kretschmer Date: Fri, 3 Nov 2023 16:39:28 +0100 Subject: [PATCH] Setup Impermanence --- nixos/roles/default.nix | 2 +- nixos/roles/prometheusNodeExporter.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/roles/default.nix b/nixos/roles/default.nix index bc94eff..b536d28 100644 --- a/nixos/roles/default.nix +++ b/nixos/roles/default.nix @@ -56,5 +56,5 @@ services = { PasswordAuthentication = false; }; }; - }; +}; } diff --git a/nixos/roles/prometheusNodeExporter.nix b/nixos/roles/prometheusNodeExporter.nix index e717411..749c6f4 100644 --- a/nixos/roles/prometheusNodeExporter.nix +++ b/nixos/roles/prometheusNodeExporter.nix @@ -1,3 +1,4 @@ +{config, ...}: { imports = [ ]; services.prometheus.exporters.node = { @@ -33,4 +34,5 @@ ]; }; networking.firewall.allowedTCPPorts = [ 9100 ]; + environment.persistence.${config.impermanence.name}.directories = [ "/var/lib/${config.services.prometheus.stateDir}" ]; }