diff --git a/nixosModules/users.nix b/nixosModules/users.nix index b32b8b2..c619fa4 100755 --- a/nixosModules/users.nix +++ b/nixosModules/users.nix @@ -8,24 +8,24 @@ users = { users = { - main = { + "${xlib.device.username}" = { name = "${xlib.device.username}"; isNormalUser = true; description = "Jor Oqyude"; # initialPassword = "1234"; hashedPasswordFile = config.sops.secrets.hashed_password.path; # hashed_password homeMode = "700"; - home = "/home/${config.users.users.main.name}"; + home = "/home/${xlib.device.username}"; extraGroups = [ "beets" "audio" "disk" "gamemode" - "libvirtd" "networkmanager" "pipewire" - "qemu-libvirtd" "wheel" + "libvirtd" + "qemu-libvirtd" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P" @@ -51,9 +51,9 @@ age_key_private = { format = "yaml"; key = "age_key_private"; - path = "${config.users.users.main.home}/.config/sops/age/keys.txt"; - owner = config.users.users.main.name; - group = config.users.users.main.group; + path = "/home/${xlib.device.username}/.config/sops/age/keys.txt"; + owner = config.users.users."${xlib.device.username}".name; + group = config.users.users."${xlib.device.username}".group; mode = "0600"; }; ssh_key_private = { @@ -61,9 +61,9 @@ # sopsFile = ../secrets/default.yaml; key = "ssh_key_private"; - path = "${config.users.users.main.home}/.ssh/id_ed25519"; - owner = config.users.users.main.name; - group = config.users.users.main.group; + path = "/home/${xlib.device.username}/.ssh/id_ed25519"; + owner = config.users.users."${xlib.device.username}".name; + group = config.users.users."${xlib.device.username}".group; mode = "0600"; }; };