make ssh keys referenced

This commit is contained in:
41666 2023-12-23 01:41:56 -05:00
parent a5d5f9f74e
commit 4afe36edd2
4 changed files with 15 additions and 9 deletions

7
nixos/users/noe-keys.nix Normal file
View file

@ -0,0 +1,7 @@
{
default =
[
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHrjnDY3hlN3cOCMBpcoh4GWdnG5nc9ZeOXJ7MtJVL3I''
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs6/s+973H28jOrvN0zr1eayT+thrs61l1qV7uFhw8I''
];
}

View file

@ -1,16 +1,11 @@
{ config, pkgs, ... }: {
users.users.noe = {
hashedPasswordFile = config.sops.secrets."users/noe/password".path;
#hashedPasswordFile = config.sops.secrets."users/noe/password".path;
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHrjnDY3hlN3cOCMBpcoh4GWdnG5nc9ZeOXJ7MtJVL3I''
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs6/s+973H28jOrvN0zr1eayT+thrs61l1qV7uFhw8I''
];
openssh.authorizedKeys.keys = import ./noe-keys.nix;
};
users.users.root.openssh.authorizedKeys.keys = config.users.users.noe.openssh.authorizedKeys.keys;
environment.systemPackages = [ pkgs.nixos-rebuild ];
security.sudo.extraRules = [
@ -26,5 +21,5 @@
}
];
sops.secrets."users/noe/password".neededForUsers = true;
#sops.secrets."users/noe/password".neededForUsers = true;
}