diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-10-13 15:45:34 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-10-13 15:45:34 +0200 |
commit | d2301081af5950d2159dc5ac3e8f71c810bfb676 (patch) | |
tree | 8b4acc9468b84bf8a6a080153ffe3cdac01c4eaa /hosts/configuration.nix | |
parent | Hosts: Home: Add password-manager (diff) | |
download | nixos-config-d2301081af5950d2159dc5ac3e8f71c810bfb676.tar.gz nixos-config-d2301081af5950d2159dc5ac3e8f71c810bfb676.tar.bz2 nixos-config-d2301081af5950d2159dc5ac3e8f71c810bfb676.zip |
Hosts: Root user: Add authorized ssh keys
Diffstat (limited to '')
-rw-r--r-- | hosts/configuration.nix | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/hosts/configuration.nix b/hosts/configuration.nix index ab47d46..4e0293c 100644 --- a/hosts/configuration.nix +++ b/hosts/configuration.nix @@ -59,15 +59,22 @@ users.mutableUsers = false; - users.users.root.hashedPassword = secrets.root.hashed_password; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.${user} = { - isNormalUser = true; - extraGroups = [ "wheel" "audio" "video" ]; # Enable ‘sudo’ for the user. - hashedPassword = secrets.baitinq.hashed_password; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID99gQ/AgXhgwAjs+opsRXMbWpXFRT2aqAOUbN3DsrhQ (none)" - ]; + users.users = { + "root" = { + hashedPassword = secrets.root.hashed_password; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID99gQ/AgXhgwAjs+opsRXMbWpXFRT2aqAOUbN3DsrhQ (none)" + ]; + }; + + "${user}" = { + isNormalUser = true; + extraGroups = [ "wheel" "audio" "video" ]; # Enable ‘sudo’ for the user. + hashedPassword = secrets.baitinq.hashed_password; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID99gQ/AgXhgwAjs+opsRXMbWpXFRT2aqAOUbN3DsrhQ (none)" + ]; + }; }; environment.variables = { |