🚸 [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; 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 in
{ {
# #
@ -135,6 +148,7 @@
lib lib
systemConfig systemConfig
systems systems
otherSystems
; ;
isDarwin = false; isDarwin = false;
}; };

View File

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