1
Fork 0

Started working on guest@euporie

This commit is contained in:
Matei Adriel 2023-05-28 02:00:10 +02:00
parent 0503a81ee8
commit 230a739327
No known key found for this signature in database
62 changed files with 188 additions and 135 deletions
hosts/nixos/common/global

View file

@ -44,11 +44,19 @@ in
# Add each host in this repo to the knownHosts list
programs.ssh = {
knownHosts = builtins.mapAttrs
(name: _: {
publicKeyFile = pubKey name;
extraHostNames = lib.optional (name == hostname) "localhost";
})
hosts;
knownHosts = lib.pipe hosts [
# attrsetof host -> attrsetof { ... }
(builtins.mapAttrs
# string -> host -> { ... }
(name: _: {
publicKeyFile = pubKey name;
extraHostNames = lib.optional (name == hostname) "localhost";
}))
# attrsetof { ... } -> attrsetof { ... }
(lib.attrset.filterAttrs
# string -> { ... } -> bool
(_: { publicKeyFile, ... }: builtins.pathExists publicKeyFile))
];
};
}