diff options
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/default.nix | 8 | ||||
-rw-r--r-- | profiles/impermanence.nix | 38 |
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); + }; } |