Add polkit

This commit is contained in:
Chris Dombroski 2024-04-29 23:04:23 -04:00 committed by Chris Dombroski
parent 5ebb95135a
commit 1f24d8a001

View file

@ -98,6 +98,25 @@
security = { security = {
rtkit.enable = true; rtkit.enable = true;
polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if (
subject.isInGroup("users")
&& (
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
)
)
{
return polkit.Result.YES;
}
})
'';
};
}; };
users.users.cdombroski = { users.users.cdombroski = {
isNormalUser = true; isNormalUser = true;