From 7a64b105f9f851b0c92e6a406c939f1ceec3e6a1 Mon Sep 17 00:00:00 2001 From: tzlil Date: Sun, 30 Jul 2023 05:04:25 +0300 Subject: fix mounts --- profiles/default.nix | 8 -------- profiles/impermanence.nix | 38 ++++++++++++++++++-------------------- 2 files changed, 18 insertions(+), 28 deletions(-) delete mode 100644 profiles/default.nix (limited to 'profiles') 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); + }; } -- cgit 1.4.1