From d2301081af5950d2159dc5ac3e8f71c810bfb676 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Thu, 13 Oct 2022 15:45:34 +0200 Subject: Hosts: Root user: Add authorized ssh keys --- hosts/configuration.nix | 25 ++++++++++++++++--------- 1 file 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 = { -- cgit 1.4.1