Files
nixos-setup/modules/nixos/common/user.nix
T
2026-04-14 18:50:11 -04:00

28 lines
591 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.skyg.user;
in
{
options.skyg.user.createSystemUser = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether to create the system user (separate from home-manager configuration)";
};
config = lib.mkIf (cfg.name != "" && cfg.createSystemUser) {
users.users.root = {
shell = pkgs.zsh;
};
users.users.${cfg.name} = {
shell = pkgs.zsh;
isNormalUser = true;
description = cfg.fullName;
extraGroups = [
"networkmanager"
"wheel"
];
};
};
}