From af678f14d9fb0d29e6b976880c1b77056736e3df Mon Sep 17 00:00:00 2001
From: Donovan Glover <donovan@dglover.co>
Date: Sat, 15 Jun 2024 13:49:38 -0400
Subject: [PATCH] phone: Improve virtualization support

Makes things snappier among other things.
---
 phone/configuration.nix | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/phone/configuration.nix b/phone/configuration.nix
index 07092b19..0033fab3 100644
--- a/phone/configuration.nix
+++ b/phone/configuration.nix
@@ -110,6 +110,27 @@ in
     };
   };
 
+  virtualisation.vmVariant = {
+    virtualisation = {
+      memorySize = 4096;
+      cores = 4;
+
+      sharedDirectories = {
+        tmp = {
+          source = "/tmp";
+          target = "/mnt";
+        };
+      };
+
+      qemu.options = [
+        "-device virtio-vga-gl"
+        "-display sdl,gl=on,show-cursor=off"
+        "-audio pa,model=hda"
+        "-full-screen"
+      ];
+    };
+  };
+
   powerManagement.enable = true;
   zramSwap.enable = true;
   nix.settings.experimental-features = [ "nix-command" "flakes" "repl-flake" ];