🚸 [shared] Added public SSH keys for androids
This commit is contained in:
14
flake.nix
14
flake.nix
@ -102,6 +102,19 @@
|
||||
nvidia.enable = false;
|
||||
};
|
||||
|
||||
knownSystems = [
|
||||
{
|
||||
# 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
|
||||
knownSystems
|
||||
;
|
||||
isDarwin = false;
|
||||
};
|
||||
|
@ -2,12 +2,14 @@
|
||||
{
|
||||
systemConfig,
|
||||
systems,
|
||||
knownSystems,
|
||||
common,
|
||||
...
|
||||
}:
|
||||
with builtins;
|
||||
let
|
||||
domain = "dns.${common.domain}";
|
||||
allSystems = knownSystems ++ 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
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user