all repos — nixfiles @ 255713131022205a8a98b038d026bc7bf37dd1ee

System and user configuration, managed by nix and home-manager

Enable virtualisation on prefect using libvirtd
Alan Pearce alan@alanpearce.eu
Sat, 25 Jun 2022 19:03:54 +0200
commit

255713131022205a8a98b038d026bc7bf37dd1ee

parent

5578f2e6a0214eb7f2d255d431aca5697315b720

2 files changed, 20 insertions(+), 0 deletions(-)

jump to
M system/prefect.nixsystem/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
+  ];
+}