23 lines
540 B
Nix
23 lines
540 B
Nix
{ ... }: {
|
|
|
|
flake.nixosModules.virtual-machines = { config, lib, pkgs, ... }: {
|
|
|
|
config = {
|
|
programs.virt-manager.enable = true;
|
|
|
|
virtualisation = {
|
|
libvirtd = {
|
|
enable = true;
|
|
qemu.swtpm.enable = true;
|
|
};
|
|
|
|
spiceUSBRedirection.enable = true;
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; lib.mkIf config.hardware.graphics.enable [
|
|
virt-viewer
|
|
];
|
|
};
|
|
};
|
|
}
|