nixos/libvirtd: enable polkit

it is enforced by an assert anyway
This commit is contained in:
Sandro Jäckel 2023-05-20 17:30:34 +02:00
parent 9cdd9edc19
commit 64361e26b2
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -414,13 +414,16 @@ in
# https://libvirt.org/daemons.html#monolithic-systemd-integration
systemd.sockets.libvirtd.wantedBy = [ "sockets.target" ];
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" &&
subject.isInGroup("libvirtd")) {
return polkit.Result.YES;
}
});
'';
security.polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" &&
subject.isInGroup("libvirtd")) {
return polkit.Result.YES;
}
});
'';
};
};
}