mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 22:45:37 +00:00
417623965e
also change theme to colorscheme
38 lines
698 B
Nix
38 lines
698 B
Nix
{ config, lib, ... }: {
|
||
|
||
options = {
|
||
|
||
user = lib.mkOption {
|
||
type = lib.types.str;
|
||
description = "Primary user of the system";
|
||
default = "nixos";
|
||
};
|
||
|
||
passwordHash = lib.mkOption {
|
||
type = lib.types.str;
|
||
description = "Password created with mkpasswd -m sha-512";
|
||
};
|
||
|
||
};
|
||
|
||
config = {
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.${config.user} = {
|
||
|
||
# Create a home directory for human user
|
||
isNormalUser = true;
|
||
|
||
# Automatically create a password to start
|
||
hashedPassword = config.passwordHash;
|
||
|
||
extraGroups = [
|
||
"wheel" # Sudo privileges
|
||
];
|
||
|
||
};
|
||
|
||
};
|
||
|
||
}
|