Add polkit
This commit is contained in:
parent
5ebb95135a
commit
1f24d8a001
1 changed files with 19 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue