oizys/modules/users/default.nix

30 lines
481 B
Nix
Raw Normal View History

2024-01-28 13:09:34 -06:00
{
nixpkgs,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkOption mkIf types;
cfg = config.users.defaultUser;
in {
options.users.defaultUser = mkOption {
default = true;
type = types.bool;
description = ''
2024-01-28 17:39:10 -06:00
include default user "daylin"
2024-01-28 13:09:34 -06:00
'';
};
config = mkIf cfg {
2024-01-28 17:39:10 -06:00
users.users.daylin = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [
"wheel" # sudo
];
initialPassword = "nix";
};
2024-01-28 13:09:34 -06:00
};
}