mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 13:22:04 +00:00
36 lines
635 B
Nix
36 lines
635 B
Nix
|
{
|
|||
|
config,
|
|||
|
lib,
|
|||
|
...
|
|||
|
}:
|
|||
|
|
|||
|
let
|
|||
|
cfg = config.nmasur.profiles.base;
|
|||
|
in
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
options.nmasur.profiles.base.enable = lib.mkEnableOption "base Linux config";
|
|||
|
|
|||
|
config = lib.mkIf cfg.enable {
|
|||
|
|
|||
|
# Allows us to declaritively set password
|
|||
|
users.mutableUsers = false;
|
|||
|
|
|||
|
# 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
|
|||
|
];
|
|||
|
};
|
|||
|
|
|||
|
};
|
|||
|
}
|