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

View File

@ -5,4 +5,18 @@
systemd.targets.hybrid-sleep.enable = 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;
}
});
'';
}