♻️ [shared] Moved files to base shared directory

This commit is contained in:
2025-05-22 19:36:29 +02:00
parent 7455299dd7
commit 21d07edcf1
18 changed files with 43 additions and 58 deletions

View File

@ -0,0 +1,27 @@
# /nix/store/<hash>/etc/ssh/ssh_config & /nix/store/<hash>/etc/ssh/authorized_keys
{
systemConfig,
systems,
common,
...
}:
with builtins;
let
domain = "dns.${common.domain}";
in
{
programs.ssh.knownHosts = listToAttrs (
map (system: {
name = system.hostName;
value = {
extraHostNames = [
"${system.hostName}.${domain}"
];
publicKey = system.ssh.publicKey;
};
}) systems
);
users.users.${systemConfig.username}.openssh.authorizedKeys.keys = (
map (system: system.ssh.publicKey) systems
);
}