Files
old-nixos-dotfiles/system/users/default.nix
2025-03-07 17:04:41 +09:00

41 lines
817 B
Nix

{ pkgs, config, userSettings, ... }: {
users.users.${userSettings.username} = {
isNormalUser = true;
description = userSettings.name;
extraGroups = [
"networkmanager"
"wheel"
"docker"
"podman"
"input"
"flatpak"
"dialout"
"video"
"audio"
"libvirtd"
"nix"
"power"
"docker"
];
uid = 1000;
homix = true;
};
users.defaultUserShell = pkgs.bash;
security.sudo = {
enable = true;
extraRules = [
{
commands =
builtins.map (command: {
command = "/run/current-system/sw/bin/${command}";
options = ["NOPASSWD"];
})
[ "poweroff" "reboot" "nixos-rebuild" "systemctl" "nmtui" "tailscale" ];
groups = [ "wheel" ];
}
];
};
}