flake/modules/nixos/core/user.nix
2025-01-17 21:02:05 +00:00

15 lines
427 B
Nix

{ pkgs, lib, config, ... }: {
options.mods.user.name = lib.mkOption {
default = "muon";
description = "username of the main system user";
};
config = {
users.users.${config.mods.user.name} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
hashedPasswordFile = config.sops.secrets.muon-password.path;
shell = if config.programs.zsh.enable then pkgs.zsh else pkgs.bash;
};
};
}