oizys/modules/users/default.nix

36 lines
626 B
Nix
Raw Normal View History

2024-01-28 13:09:34 -06:00
{
config,
lib,
pkgs,
...
2024-05-06 14:32:00 -05:00
}:
let
2024-01-28 13:09:34 -06:00
inherit (lib) mkOption mkIf types;
cfg = config.users.defaultUser;
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;
extraGroups = [
"wheel" # sudo
2024-02-15 10:28:25 -06:00
"docker"
2024-01-28 17:39:10 -06:00
];
initialPassword = "nix";
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
};
}