Refactor SSH keys to use shared configuration
Move hardcoded SSH keys to shared/ssh-keys.nix and import in tahani configuration. 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
user,
|
||||
...
|
||||
}: let
|
||||
keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8iAnIaa1deoc7jw8YACPNVka1ZFJxhnU4G74TmS+p"];
|
||||
sshKeys = import ../../../shared/ssh-keys.nix;
|
||||
in {
|
||||
imports = [
|
||||
../../../profiles/base
|
||||
@@ -92,11 +92,11 @@ in {
|
||||
extraGroups = [
|
||||
"docker"
|
||||
];
|
||||
openssh.authorizedKeys.keys = keys;
|
||||
openssh.authorizedKeys.keys = sshKeys.keys;
|
||||
};
|
||||
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = keys;
|
||||
openssh.authorizedKeys.keys = sshKeys.keys;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
6
shared/ssh-keys.nix
Normal file
6
shared/ssh-keys.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
# Shared SSH public keys for all hosts
|
||||
keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8iAnIaa1deoc7jw8YACPNVka1ZFJxhnU4G74TmS+p"
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user