|
|
|
|
@ -10,27 +10,32 @@ |
|
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, nixos-hardware, ... }: |
|
|
|
|
let |
|
|
|
|
# Authorization keys for user mappings (login keys per user) |
|
|
|
|
auth_keys = { |
|
|
|
|
alice = [ |
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALiceKeyPlaceholder alice@host" |
|
|
|
|
# Per-user mapping of auth (login) and sudo keys |
|
|
|
|
key_mappings = { |
|
|
|
|
alice = { |
|
|
|
|
auth = [ |
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAliceAuthKeyPlaceholder alice@host" |
|
|
|
|
]; |
|
|
|
|
bob = [ |
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBobKeyPlaceholder bob@host" |
|
|
|
|
sudo = [ |
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAliceSudoKeyPlaceholder alice-admin@host" |
|
|
|
|
]; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
# Sudo keys per user (keys granting sudo, applied to root) |
|
|
|
|
sudo_keys = [ |
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAISudoKeyPlaceholder admin@host" |
|
|
|
|
bob = { |
|
|
|
|
auth = [ |
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBobAuthKeyPlaceholder bob@host" |
|
|
|
|
]; |
|
|
|
|
sudo = [ |
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBobSudoKeyPlaceholder bob-admin@host" |
|
|
|
|
]; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
sharedModules = [ |
|
|
|
|
./modules/users.nix |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
sharedArgs = { |
|
|
|
|
inherit auth_keys sudo_keys; |
|
|
|
|
inherit key_mappings; |
|
|
|
|
}; |
|
|
|
|
in { |
|
|
|
|
nixosConfigurations = { |
|
|
|
|
|