will the nuclear option work?

This commit is contained in:
Peder Bergebakken Sundt 2023-09-09 11:58:42 +02:00
parent ca14e8b573
commit fb185edafb
1 changed files with 14 additions and 0 deletions

View File

@ -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;
}
});
'';
} }