summary refs log tree commit diff
path: root/profiles
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
parent5a956add3f59715b9cf43a044abfabce4ca6382f (diff)
fix mounts
Diffstat (limited to 'profiles')
-rw-r--r--profiles/default.nix8
-rw-r--r--profiles/impermanence.nix38
2 files changed, 18 insertions, 28 deletions
diff --git a/profiles/default.nix b/profiles/default.nix
deleted file mode 100644
index 77921b6..0000000
--- a/profiles/default.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{inputs, ...}: {
-  flake.nixosModules = {
-    nix = import ./nix.nix {inherit inputs;};
-    security = ./security.nix;
-    tzlil = ./tzlil.nix;
-    ssh = ./ssh.nix;
-  };
-}
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);
+  };
 }