From d2f908005cc784d383176b34aa804c13736ee726 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Tue, 31 Dec 2024 06:59:22 -0500 Subject: [PATCH] Persist the .ssh known_hosts. --- nix/configuration/configuration.nix | 1 + nix/configuration/roles/ssh/default.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 nix/configuration/roles/ssh/default.nix diff --git a/nix/configuration/configuration.nix b/nix/configuration/configuration.nix index a813049..91ecf98 100644 --- a/nix/configuration/configuration.nix +++ b/nix/configuration/configuration.nix @@ -37,6 +37,7 @@ ./roles/qemu ./roles/wireguard ./roles/bsnes + ./roles/ssh ]; nix.settings.experimental-features = [ diff --git a/nix/configuration/roles/ssh/default.nix b/nix/configuration/roles/ssh/default.nix new file mode 100644 index 0000000..fd7f77e --- /dev/null +++ b/nix/configuration/roles/ssh/default.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { + hideMounts = true; + users.talexander = { + files = [ + ".ssh/known_hosts" + ]; + }; + }; +}