28 lines
498 B
Nix
28 lines
498 B
Nix
# main-user.nix
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.main-user;
|
|
in
|
|
{
|
|
options.main-user = {
|
|
enable
|
|
= lib.mkEnableOption "enable user module";
|
|
userName = lib.mkOption {
|
|
default = "mainuser";
|
|
description = ''
|
|
username
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
users.users.${config.main-user.userName} = {
|
|
isNormalUser = true;
|
|
initialPasswork = "p4ss";
|
|
description = "main user";
|
|
shell = pkgs.bash;
|
|
};
|
|
};
|
|
}
|