diff options
author | tzlil <tzlils@protonmail.com> | 2023-01-14 15:26:57 +0200 |
---|---|---|
committer | tzlil <tzlils@protonmail.com> | 2023-01-14 15:26:57 +0200 |
commit | d9289c81a9d5e3e2e54382873f0b3eb7709f7e4d (patch) | |
tree | 34372d19912f95ff980378381eb444e15ea85fcf | |
parent | 2524df484f6d378cf7731ab30c5f371362f7795f (diff) |
use userKnownHostsFile with toFile
-rw-r--r-- | profiles/user.nix | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/profiles/user.nix b/profiles/user.nix index 71c6617..97597b0 100644 --- a/profiles/user.nix +++ b/profiles/user.nix @@ -3,6 +3,7 @@ lib, config, inputs, + builtins, ... }: { imports = [ @@ -45,12 +46,9 @@ }; programs.ssh = { enable = true; - knownHosts = { - pc = { - extraHostNames = [ "100.99.246.128" ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINu5lRKb1Ao4uj1tAV10QHKIvXfC8ncQ65b+oJtxrd1e"; - }; - }; + userKnownHostsFile = builtins.toFile "known_hosts" " + pc ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINu5lRKb1Ao4uj1tAV10QHKIvXfC8ncQ65b+oJtxrd1e + "; matchBlocks."*".identityFile = config.age.secrets."id_ed25519".path; }; }; |