- system.build.squashfsStore =
- pkgs.callPackage (modulesPath + "/../lib/make-squashfs.nix") {
- storeContents = config.virtualisation.additionalPaths;
+ # We use this to disable fsck runs on the ext4 nix store image because stage-1
+ # fsck crashes (maybe because the device is read-only?), halting boot.
+ boot.initrd.checkJournalingFS = false;
+
+ system.build.nixStoreImage =
+ import (modulesPath + "/../lib/make-disk-image.nix") {
+ inherit pkgs config lib;
+ additionalPaths = [
+ (config.virtualisation.host.pkgs.closureInfo {
+ rootPaths = config.virtualisation.additionalPaths;
+ })
+ ];
+ onlyNixStore = true;
+ label = "nix-store";
+ partitionTableType = "none";
+ installBootLoader = false;
+ diskSize = "auto";
+ additionalSpace = "0M";
+ copyChannel = false;