]> git.scottworley.com Git - nixos-qemu-vm-isolation/commitdiff
24.11: Stop using includes-to-excludes.py main
authorScott Worley <scottworley@scottworley.com>
Wed, 11 Dec 2024 23:29:23 +0000 (15:29 -0800)
committerScott Worley <scottworley@scottworley.com>
Wed, 11 Dec 2024 23:29:23 +0000 (15:29 -0800)
modules/qemu-vm-isolation.nix

index a7189e56a02ce64b89e96e2fa80ef4d93a72e821..69bacde444273ae9076c4ffe1f8d8a160767259c 100644 (file)
@@ -32,23 +32,19 @@ let
     erofs = "${
         hostPkgs.runCommand "nix-store-image" { } ''
           mkdir $out
-          cd ${builtins.storeDir}
-          ${hostPkgs.erofs-utils}/bin/mkfs.erofs \
-            --force-uid=0 \
-            --force-gid=0 \
-            -L nix-store \
-            -U eb176051-bd15-49b7-9e6b-462e0b467019 \
-            -T 0 \
-            --exclude-regex="$(
-              <${storeContents}/store-paths \
-                sed -e 's^.*/^^g' \
-              | cut -c -10 \
-              | ${hostPkgs.python3}/bin/python -c ${
-                escapeShellArg (builtins.readFile
-                  (modulesPath + "/virtualisation/includes-to-excludes.py"))
-              } )" \
-            $out/nix-store.img \
-            .
+          ${hostPkgs.gnutar}/bin/tar --create \
+            --absolute-names \
+            --verbatim-files-from \
+            --transform 'flags=rSh;s|/nix/store/||' \
+            --files-from ${storeContents}/store-paths \
+            | ${hostPkgs.erofs-utils}/bin/mkfs.erofs \
+              --force-uid=0 \
+              --force-gid=0 \
+              -L nix-store \
+              -U eb176051-bd15-49b7-9e6b-462e0b467019 \
+              -T 0 \
+              --tar=f \
+              $out/nix-store.img
         ''
       }/nix-store.img";
     squashfs =