2024-01-28 13:09:34 -06:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
2024-05-06 14:32:00 -05:00
|
|
|
}:
|
|
|
|
let
|
2024-07-03 13:05:25 -05:00
|
|
|
inherit (lib)
|
|
|
|
mkOption
|
|
|
|
mkIf
|
|
|
|
types
|
|
|
|
optional
|
|
|
|
;
|
2024-01-28 13:09:34 -06:00
|
|
|
cfg = config.users.defaultUser;
|
2024-07-03 10:52:28 -05:00
|
|
|
isDocker = config.oizys.docker.enable;
|
|
|
|
isDesktop = config.oizys.desktop.enable;
|
2024-05-06 14:32:00 -05:00
|
|
|
in
|
|
|
|
{
|
2024-01-28 13:09:34 -06:00
|
|
|
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;
|
2024-02-05 17:41:27 -06:00
|
|
|
|
2024-01-28 17:39:10 -06:00
|
|
|
shell = pkgs.zsh;
|
2024-07-03 10:52:28 -05:00
|
|
|
extraGroups = [ "wheel" ] ++ optional isDesktop "audio" ++ optional isDocker "docker";
|
|
|
|
|
2024-06-19 11:49:37 -05:00
|
|
|
initialHashedPassword = "$2b$05$mGMrDFzf2cXLaoOlVQbGvOBV7UZlDt9dLg9Xqxutb/uHpjF5VrTBO";
|
2024-02-05 17:41:27 -06:00
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9"
|
|
|
|
];
|
2024-01-28 17:39:10 -06:00
|
|
|
};
|
2024-01-28 13:09:34 -06:00
|
|
|
};
|
|
|
|
}
|