blob: 0c45f4130a867dab921224f5d2250231642a3bec (
plain) (
tree)
|
|
{ config, pkgs, ... }: let
user = config.global.userdata.name;
in {
security.sudo = {
enable = true;
extraRules = [{
commands = [
{
command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate";
options = [ "SETENV" "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/reboot";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/poweroff";
options = [ "NOPASSWD" ];
}
];
users = [ user ];
}];
};
}
|