Add polkit
This commit is contained in:
parent
fa97e16c8e
commit
73f9033023
1 changed files with 19 additions and 0 deletions
|
@ -98,6 +98,25 @@
|
|||
|
||||
security = {
|
||||
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 = {
|
||||
isNormalUser = true;
|
||||
|
|
Loading…
Reference in a new issue