This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/system/users.nix
James Patrick d7e2c0a924 Switching from hardcoded username.
Will this ever change? No like likely, but I do think that this is the
correct way to do this.
2022-08-14 19:35:15 -04:00

20 lines
519 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Define a user account. Don't forget to set a password with passwd.
{ config, lib, pkgs, user, ... }: {
users.users = {
root.initialPassword = "noreallychangemenow";
"${user.name}" = {
description = "${user.description}";
extraGroups = [ "wheel" "systemd-journal" ];
initialPassword = "nixos";
isNormalUser = true;
shell = pkgs.zsh;
};
};
home-manager.users."${user.name}".home = {
username = "${user.name}";
homeDirectory = "/home/${user.name}";
};
}