Files
nix-flake/hosts/takamaki/modules/sudo.nix
T
greyweather e8f1f83930 gaming improvements
- switched to cachyos-bore kernel from mainline lts kernel
- pinned mesa version at 25 to fix issues with minecraft shaders
- switched steam to use the flatpak, since native steam wouldn't launch with the downgraded mesa version
2026-07-15 02:38:58 +01:00

44 lines
1014 B
Nix

{
pkgs,
config,
...
}: {
security.sudo = {
enable = true;
extraRules = [{
commands = [
{
command = "${pkgs.systemd}/bin/systemctl poweroff";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/shutdown";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/systemctl reboot";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/reboot";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.efibootmgr}/bin/efibootmgr";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.efibootmgr}/bin/efibootdump";
options = [ "NOPASSWD" ];
}
];
users = [ "grey" ];
}];
extraConfig = with pkgs; ''
Defaults:grey secure_path="${lib.makeBinPath [
systemd
]}:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"
'';
};
}