blob: 222fdabea284502323c0b4c804d23d4f986dedc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{ config, ... }:
{
virtualisation.libvirtd = {
enable = true;
qemu = {
ovmf.enable = true;
runAsRoot = false;
};
onBoot = "ignore";
onShutdown = "shutdown";
};
programs.virt-manager.enable = true;
# Add any users in the 'wheel' group to the 'libvirtd' group.
users.groups.libvirtd.members =
with builtins; let users = config.users.users; in
filter (u: elem "wheel" users.${u}.extraGroups) (attrNames users);
}
|