diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2023-05-20 17:30:34 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2023-05-20 17:30:34 +0200 |
commit | 64361e26b22f6f78a1494affc0b482ac668e878f (patch) | |
tree | 3eee73a2785e165bb69e42d5b24c2149fb6c575f | |
parent | 9cdd9edc19ef2b7fa6026a26ede191a25b70380f (diff) |
nixos/libvirtd: enable polkit
it is enforced by an assert anyway
-rw-r--r-- | nixos/modules/virtualisation/libvirtd.nix | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index 7c95405ed3189..537db537279a1 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -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; + } + }); + ''; + }; }; } |