summary refs log tree commit diff
path: root/profiles/impermanence.nix
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-07-30 05:04:25 +0300
committertzlil <tzlils@protonmail.com>2023-07-30 05:04:25 +0300
commit7a64b105f9f851b0c92e6a406c939f1ceec3e6a1 (patch)
treef3c68fb2824bfe7ad3071871a375360801c258f6 /profiles/impermanence.nix
parent5a956add3f59715b9cf43a044abfabce4ca6382f (diff)
fix mounts
Diffstat (limited to 'profiles/impermanence.nix')
-rw-r--r--profiles/impermanence.nix38
1 files changed, 18 insertions, 20 deletions
diff --git a/profiles/impermanence.nix b/profiles/impermanence.nix
index e325405..d4034a3 100644
--- a/profiles/impermanence.nix
+++ b/profiles/impermanence.nix
@@ -1,29 +1,27 @@
-{inputs, ...}: {
+{inputs,
   config,
   lib,
   options,
   ...
 }: let
-  sshHostKeys = builtins.catAttrs "path" ["/etc/ssh/ssh_host_ed25519_key"];
+  sshHostKeys = ["/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_rsa_key"];
 in {
   imports = [inputs.impermanence.nixosModules.impermanence];
 
-  config = lib.mkMerge [
-    {
-      environment.persistence."/nix/persistent" = {
-        hideMounts = true;
-        directories = [
-          "/var/log"
-          "/var/lib/systemd/coredump"
-          "/tmp" # Make builds not crash by running them on disk instead of RAM (We still clean /tmp on boot)
-        ];
-        files =
-          [
-            "/etc/machine-id"
-          ]
-          ++ sshHostKeys;
-      };
-    }
-    (lib.optionalAttrs (options ? age) {age.identityPaths = map (x: "/nix/persistent" + x) sshHostKeys;})
-  ];
+  config = {
+    environment.persistence."/nix/persistent" = {
+      hideMounts = true;
+      directories = [
+        "/var/log"
+        "/var/lib/systemd/coredump"
+        "/tmp" # Make builds not crash by running them on disk instead of RAM (We still clean /tmp on boot)
+      ];
+      files =
+        [
+          "/etc/machine-id"
+        ]
+        ++ sshHostKeys;
+    };
+    age.identityPaths = (map (x: "/nix/persistent" + x) sshHostKeys);
+  };
 }