🚸 [shared] Added public SSH keys for androids

This commit is contained in:
2025-05-31 14:34:54 +02:00
parent e986f337bd
commit bc8bced7f9
2 changed files with 18 additions and 2 deletions

View File

@ -102,6 +102,19 @@
nvidia.enable = false;
};
otherSystems = [
{
# Samsung S23 FE
hostName = "localhost-y4maoyqm";
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII7SSjiqnjif1Kko60iXVTKJ7a1/lRlR8TFNtoclNcnQ";
}
{
# OnePlus 8
hostName = "localhost-4izgka9k";
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALtulVgLrUEpKnpfPFQTHjaEXTxs2Q818NC18eLx0bj";
}
];
in
{
#
@ -135,6 +148,7 @@
lib
systemConfig
systems
otherSystems
;
isDarwin = false;
};

View File

@ -2,12 +2,14 @@
{
systemConfig,
systems,
otherSystems,
common,
...
}:
with builtins;
let
domain = "dns.${common.domain}";
allSystems = otherSystems ++ systems;
in
{
programs.ssh.knownHosts = listToAttrs (
@ -19,9 +21,9 @@ in
];
publicKey = system.ssh.publicKey;
};
}) systems
}) allSystems
);
users.users.${systemConfig.username}.openssh.authorizedKeys.keys = (
map (system: system.ssh.publicKey) systems
map (system: system.ssh.publicKey) allSystems
);
}