will the nuclear option work?
This commit is contained in:
parent
ca14e8b573
commit
fb185edafb
|
@ -5,4 +5,18 @@
|
||||||
systemd.targets.hybrid-sleep.enable = false;
|
systemd.targets.hybrid-sleep.enable = false;
|
||||||
|
|
||||||
services.xserver.displayManager.gdm.autoSuspend = false;
|
services.xserver.displayManager.gdm.autoSuspend = false;
|
||||||
|
|
||||||
|
security.polkit.enable = true;
|
||||||
|
security.polkit.extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id == "org.freedesktop.login1.suspend" ||
|
||||||
|
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
|
||||||
|
action.id == "org.freedesktop.login1.hibernate" ||
|
||||||
|
action.id == "org.freedesktop.login1.hibernate-multiple-sessions")
|
||||||
|
{
|
||||||
|
return polkit.Result.NO;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue