niksos/options/common/libvirt.nix

25 lines
485 B
Nix
Raw Normal View History

2024-02-29 01:41:04 +01:00
{
config,
...
2024-07-22 21:54:42 +02:00
}: let
2024-07-15 23:18:25 +02:00
inherit (config.poz.other.system) username;
2024-07-22 21:54:42 +02:00
in {
2024-02-29 01:41:04 +01:00
virtualisation = {
libvirtd = {
enable = true;
onBoot = "ignore";
qemu = {
ovmf.enable = true;
runAsRoot = false;
swtpm.enable = true;
};
};
};
networking.firewall.trustedInterfaces = [ "virbr0" ];
2024-07-22 21:54:42 +02:00
users.users.${username} = {
2024-02-29 01:41:04 +01:00
extraGroups = [ "libvirtd" ];
};
}