Enable virtualisation on prefect using libvirtd
Alan Pearce alan@alanpearce.eu
Sat, 25 Jun 2022 19:03:54 +0200
2 files changed, 20 insertions(+), 0 deletions(-)
M system/prefect.nix → system/prefect.nix
@@ -25,6 +25,7 @@ ./settings/hardware/trackball.nix ./settings/hardware/trezor.nix ./settings/services/samba.nix ./settings/services/syncthing.nix + ./settings/services/virtualisation.nix ./settings/services/zeroconf.nix ./settings/user-interface.nix ./settings/programs/base.nix
A system/settings/services/virtualisation.nix
@@ -0,0 +1,19 @@+{ config, pkgs, ... }: + +{ + virtualisation.libvirtd = { + enable = true; + onBoot = "ignore"; + onShutdown = "shutdown"; + qemu = { + package = pkgs.qemu_kvm; + ovmf.enable = true; + runAsRoot = false; + }; + }; + + environment.systemPackages = with pkgs; [ + virtmanager + OVMF + ]; +}