Skip to content

Commit 26efd1b

Browse files
committed
Drop support for < 23.05
1 parent 47cb654 commit 26efd1b

File tree

1 file changed

+29
-36
lines changed

1 file changed

+29
-36
lines changed

modules/qemu-vm-isolation.nix

+29-36
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,38 @@ let
1212
else
1313
"/nix/store";
1414

15-
in mkMerge [
16-
{
17-
18-
boot.initrd.availableKernelModules = [ "squashfs" ];
19-
20-
fileSystems = mkVMOverride {
21-
"${storeMountPath}" = {
22-
device =
23-
lookupDriveDeviceName "nixstore" config.virtualisation.qemu.drives;
24-
fsType = "squashfs";
25-
options = [ "ro" ];
26-
neededForBoot = true;
27-
};
15+
in {
16+
17+
boot.initrd.availableKernelModules = [ "squashfs" ];
18+
19+
fileSystems = mkVMOverride {
20+
"${storeMountPath}" = {
21+
device =
22+
lookupDriveDeviceName "nixstore" config.virtualisation.qemu.drives;
23+
fsType = "squashfs";
24+
options = [ "ro" ];
25+
neededForBoot = true;
2826
};
27+
};
2928

30-
system.build.squashfsStore =
31-
pkgs.callPackage (modulesPath + "/../lib/make-squashfs.nix") {
32-
storeContents = config.virtualisation.additionalPaths;
33-
};
29+
system.build.squashfsStore =
30+
pkgs.callPackage (modulesPath + "/../lib/make-squashfs.nix") {
31+
storeContents = config.virtualisation.additionalPaths;
32+
};
3433

35-
virtualisation = {
34+
virtualisation = {
3635

37-
sharedDirectories = mkForce { };
36+
sharedDirectories = mkForce { };
3837

39-
qemu.drives = [{
40-
name = "nixstore";
41-
file = "${config.system.build.squashfsStore}";
42-
driveExtraOpts = {
43-
format = "raw";
44-
read-only = "on";
45-
werror = "report";
46-
};
47-
}];
38+
qemu.drives = [{
39+
name = "nixstore";
40+
file = "${config.system.build.squashfsStore}";
41+
driveExtraOpts = {
42+
format = "raw";
43+
read-only = "on";
44+
werror = "report";
45+
};
46+
}];
4847

49-
};
50-
}
51-
(mkIf (lib.version < "23.05") {
52-
# This should always have been the default.
53-
virtualisation.bootDevice =
54-
lookupDriveDeviceName "root" config.virtualisation.qemu.drives;
55-
})
56-
]
48+
};
49+
}

0 commit comments

Comments
 (0)