many improvements
This commit is contained in:
27
modules/nixos/user.nix
Normal file
27
modules/nixos/user.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.nix-config;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nix-config.userName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "remy";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
users.users.${cfg.userName} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
# other groups are added as needed, eg. networkmanager
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user