mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-08 21:13:52 +00:00
37 lines
845 B
Nix
37 lines
845 B
Nix
{ pkgs, lib, config, flakeDir, userName, True, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.module.misc.users;
|
|
in {
|
|
options = {
|
|
module.misc.users = {
|
|
enable = mkEnableOption "";
|
|
shell = mkOption {
|
|
default = null;
|
|
type = types.str;
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.${cfg.shell} = True;
|
|
users = { # USERS SETS
|
|
defaultUserShell = pkgs.${cfg.shell};
|
|
groups.${userName} = { };
|
|
users.${userName} = {
|
|
uid = 1000;
|
|
home = "/home/${userName}";
|
|
hashedPasswordFile = "${flakeDir}/modules/nixos/misc/users/passwd";
|
|
useDefaultShell = true;
|
|
createHome = true;
|
|
isSystemUser = true;
|
|
group = "${userName}";
|
|
extraGroups =
|
|
[ "video" "audio" "networkmanager" "wheel" "docker" "libvirtd" ];
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|