nix-config/modules/libvirtd/default.nix

18 lines
459 B
Nix
Raw Normal View History

2024-11-10 17:54:08 -05:00
{ 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 = builtins.filter (x: builtins.elem "wheel" config.users.users."${x}".extraGroups) (builtins.attrNames config.users.users);
}