blob: 08c8578487333a9bbf3d4c5cdac4ac92a6844f8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{ config, lib, pkgs, ... }:
let
cfg = config.szpont.sys.srv.kvm;
in
{
options.szpont.sys.srv.kvm.enable = lib.mkEnableOption "KVM/QEMU virtualization with Virt-Manager";
config = lib.mkIf cfg.enable {
virtualisation.libvirtd = {
enable = true;
qemu.package = pkgs.qemu_kvm;
qemu.swtpm.enable = true;
};
programs.virt-manager.enable = true;
users.users.adam.extraGroups = [ "libvirtd" ];
boot.initrd.kernelModules = [ "kvm-amd" ];
};
}
|