blob: 64ad8c6e258321c29ffbeb686992365c072bccde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.virt.qemu;
in {
config = mkIf cfg.enable {
programs.virt-manager.enable = true;
users.groups.kvm.members = [config.user];
users.groups.libvirtd.members = [config.user];
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
environment.systemPackages = with pkgs; [
qemu
];
networking.firewall.trustedInterfaces = [
"virbr0"
];
};
}
|