diff --git a/nix/modules/machine/root/ephemeral.nix b/nix/modules/machine/root/ephemeral.nix index 729f1cc..0b9657f 100644 --- a/nix/modules/machine/root/ephemeral.nix +++ b/nix/modules/machine/root/ephemeral.nix @@ -17,13 +17,6 @@ in btrfs subvolume delete "/btrfs_tmp/root" fi ''; - persistFiles = [ - #TODO: move to ssh config - "/etc/ssh/ssh_host_ed25519_key" - "/etc/ssh/ssh_host_ed25519_key.pub" - "/etc/ssh/ssh_host_rsa_key" - "/etc/ssh/ssh_host_rsa_key.pub" - ]; }) ]; }; diff --git a/nix/modules/ssh.nix b/nix/modules/ssh.nix new file mode 100644 index 0000000..4c8fde2 --- /dev/null +++ b/nix/modules/ssh.nix @@ -0,0 +1,10 @@ +{ + flake.modules.nixos.default = { + persistFiles = [ + "/etc/ssh/ssh_host_ed25519_key" + "/etc/ssh/ssh_host_ed25519_key.pub" + "/etc/ssh/ssh_host_rsa_key" + "/etc/ssh/ssh_host_rsa_key.pub" + ]; + }; +}