Add declarative ssh known hosts

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-02-25 12:28:22 +00:00
parent f843deafbe
commit a3dc4129d6
22 changed files with 258 additions and 79 deletions

View File

@@ -2,13 +2,20 @@
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ ... }:
{ inputs, system, ... }:
let
selfPkgs = inputs.self.packages.${system};
in
{
home-manager.users.${user}.programs.ssh.matchBlocks = {
"cldlgn.fyi.sas.com" = {
inherit user;
hostname = "cldlgn.fyi.sas.com";
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
home-manager.users.${user}.programs.ssh = {
matchBlocks = {
"cldlgn.fyi.sas.com" = {
inherit user;
hostname = "cldlgn.fyi.sas.com";
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
};
};
userKnownHostsFiles = with selfPkgs; [ ssh-known-hosts-sas-cldlgn ];
};
}