summary refs log tree commit diff
path: root/configuration/vm
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-12-30 21:30:42 +0100
committerMel <einebeere@gmail.com>2024-12-30 21:30:42 +0100
commite561cdc080c9aa8bbe127613c754715cd6740228 (patch)
treec912184e5ed4c7fb2a84dc969829e52a566c6816 /configuration/vm
parentf777a13f920809ddf0cbd7fb8e36f14edc03af3f (diff)
downloadspecimen-e561cdc080c9aa8bbe127613c754715cd6740228.tar.zst
specimen-e561cdc080c9aa8bbe127613c754715cd6740228.zip
Add Incus patch to repair compatibility with QEMU 9.1.2
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'configuration/vm')
-rw-r--r--configuration/vm/incus.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/configuration/vm/incus.nix b/configuration/vm/incus.nix
index 3a802a2..e14716f 100644
--- a/configuration/vm/incus.nix
+++ b/configuration/vm/incus.nix
@@ -7,6 +7,19 @@
 }:
 
 let
+  # qemu 9.1.2 no longer supports strings being passed instead of some
+  # integer parameters. incus already has the fix, but it hasn't made it
+  # into a release yet.
+  # see: https://github.com/lxc/incus/issues/1522
+  incusPatch = pkgs.fetchpatch {
+    name = "1531.patch";
+    url = "https://github.com/lxc/incus/pull/1531.patch";
+    sha256 = "sha256-tM/+JRH0OwR3bM8gk3yNo9SSAEMqpS2HP+OzooV3DJY=";
+  };
+  incus = pkgs.incus.overrideAttrs (attrs: {
+    patches = (attrs.patches or [ ]) ++ [ incusPatch ];
+  });
+
   toYAML = lib.generators.toYAML { };
 
   cloudInitConfiguration = {
@@ -35,7 +48,7 @@ in
 {
   virtualisation.incus = {
     enable = true;
-    package = pkgs.incus;
+    package = incus;
     preseed = {
       networks = [
         {