Files
nix-new/system/user.nix

34 lines
686 B
Nix
Raw Normal View History

2025-06-23 00:47:36 +05:00
{ config, pkgs, ... }: {
users.users = {
fox = {
isNormalUser = true;
extraGroups = [ "wheel" "input" "networkmanager" "video" "audio" ];
shell = pkgs.zsh;
};
};
services.getty.autologinUser = "fox";
environment.loginShellInit = ''
[[ "$(tty)" == /dev/tty1 ]] && Hyprland
'';
security = {
polkit = {
enable = true;
};
sudo = {
enable = true;
extraRules = [{
commands = [
{
command = "${pkgs.systemd}/bin/reboot";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/poweroff";
options = [ "NOPASSWD" ];
}];
groups = [ "wheel" ];
}];
};
};
}