···145145146146`diskSize` (Number; _optional_)
147147148148-: Controls the disk size (in megabytes) of the VM used to run the script specified in `runAsRoot`.
148148+: Controls the disk size in MiB (1024x1024 bytes) of the VM used to run the script specified in `runAsRoot`.
149149 This attribute is ignored if `runAsRoot` is `null`.
150150151151 _Default value:_ 1024.
152152153153`buildVMMemorySize` (Number; _optional_)
154154155155-: Controls the amount of memory (in megabytes) provisioned for the VM used to run the script specified in `runAsRoot`.
155155+: Controls the amount of memory in MiB (1024x1024 bytes) provisioned for the VM used to run the script specified in `runAsRoot`.
156156 This attribute is ignored if `runAsRoot` is `null`.
157157158158 _Default value:_ 512.
+1-1
doc/build-helpers/images/makediskimage.section.md
···108108 diskSize = "auto";
109109 additionalSpace = "0M"; # Defaults to 512M.
110110 copyChannel = false;
111111- memSize = 2048; # Qemu VM memory size in megabytes. Defaults to 1024M.
111111+ memSize = 2048; # Qemu VM memory size in MiB (1024*1024 bytes). Defaults to 1024M.
112112}
113113```
+1-1
doc/build-helpers/special/vm-tools.section.md
···2323### Attributes {#vm-tools-runInLinuxVM-attributes}
24242525* `preVM` (optional). Shell command to be evaluated *before* the VM is started (i.e., on the host).
2626-* `memSize` (optional, default `512`). The memory size of the VM in MiB.
2626+* `memSize` (optional, default `512`). The memory size of the VM in MiB (1024×1024 bytes).
2727* `diskImage` (optional). A file system image to be attached to `/dev/sda`.
2828 Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
2929
···92929393`virtualisation.memorySize`
94949595-: The memory of the VM in megabytes.
9595+: The memory of the VM in MiB (1024×1024 bytes).
96969797`virtualisation.vlans`
9898
+2-2
nixos/lib/make-disk-image.nix
···104104 # The NixOS configuration to be installed onto the disk image.
105105 config,
106106107107- # The size of the disk, in megabytes.
107107+ # The size of the disk, in MiB (1024*1024 bytes).
108108 # if "auto" size is calculated based on the contents copied to it and
109109 # additionalSpace is taken into account.
110110 diskSize ? "auto",
···160160 # Shell code executed after the VM has finished.
161161 postVM ? "",
162162163163- # Guest memory size
163163+ # Guest memory size in MiB (1024*1024 bytes)
164164 memSize ? 1024,
165165166166 # Copy the contents of the Nix store to the root of the image and
+3-3
nixos/lib/make-multi-disk-zfs-image.nix
···3030 # The NixOS configuration to be installed onto the disk image.
3131 config,
32323333- # size of the FAT boot disk, in megabytes.
3333+ # size of the FAT boot disk in MiB (1024*1024 bytes)
3434 bootSize ? 1024,
35353636- # The size of the root disk, in megabytes.
3636+ # The size of the root disk in MiB (1024*1024 bytes)
3737 rootSize ? 2048,
38383939 # The name of the ZFS pool
···7474 # Shell code executed after the VM has finished.
7575 postVM ? "",
76767777- # Guest memory size
7777+ # Guest memory size in MiB (1024*1024 bytes)
7878 memSize ? 1024,
79798080 name ? "nixos-disk-image",
+4-4
nixos/lib/make-single-disk-zfs-image.nix
···1919 # The NixOS configuration to be installed onto the disk image.
2020 config,
21212222- # size of the FAT partition, in megabytes.
2323- bootSize ? 1024
2222+ # size of the FAT partition, in MiB (1024x1024 bytes).
2323+ bootSize ? 1024,
24242525- , # memory allocated for virtualized build instance
2525+ # memory allocated for virtualized build instance, in MiB (1024x1024 bytes).
2626 memSize ? 1024,
27272828- # The size of the root partition, in megabytes.
2828+ # The size of the root partition, in MiB (1024x1024 bytes).
2929 rootSize ? 2048,
30303131 # The name of the ZFS pool
+1-1
nixos/modules/config/swap.nix
···121121 description = ''
122122 If this option is set, ‘device’ is interpreted as the
123123 path of a swapfile that will be created automatically
124124- with the indicated size (in megabytes).
124124+ with the indicated size in MiB (1024×1024 bytes).
125125 '';
126126 };
127127
+1-2
nixos/modules/installer/sd-card/sd-image.nix
···8080 type = types.int;
8181 default = 8;
8282 description = ''
8383- Gap in front of the /boot/firmware partition, in mebibytes (1024×1024
8484- bytes).
8383+ Gap in front of the /boot/firmware partition, in MiB (1024×1024 bytes).
8584 Can be increased to make more space for boards requiring to dd u-boot
8685 SPL before actual partitions.
8786
+2-2
nixos/modules/profiles/nix-builder-vm.nix
···4848 default = 20 * 1024;
4949 type = types.int;
5050 example = 30720;
5151- description = "The maximum disk space allocated to the runner in MB";
5151+ description = "The maximum disk space allocated to the runner in MiB (1024×1024 bytes).";
5252 };
5353 memorySize = mkOption {
5454 default = 3 * 1024;
5555 type = types.int;
5656 example = 8192;
5757- description = "The runner's memory in MB";
5757+ description = "The runner's memory in MiB (1024×1024 bytes).";
5858 };
5959 min-free = mkOption {
6060 default = 1024 * 1024 * 1024;
···4444 maxMemory = lib.mkOption {
4545 type = lib.types.ints.unsigned;
4646 default = 64;
4747- description = "The maximum amount of memory to use for storage, in megabytes.";
4747+ description = "The maximum amount of memory to use for storage, in MiB (1024×1024 bytes).";
4848 };
49495050 maxConnections = lib.mkOption {
+1-1
nixos/modules/virtualisation/disk-size-option.nix
···1818 default = if config.virtualisation.diskSizeAutoSupported then "auto" else 1024;
1919 defaultText = lib.literalExpression "if virtualisation.diskSizeAutoSupported then \"auto\" else 1024";
2020 description = ''
2121- The disk size in megabytes of the virtual machine.
2121+ The disk size in MiB (1024×1024 bytes) of the virtual machine.
2222 '';
2323 };
2424 };
···405405 type = types.ints.positive;
406406 default = 1024;
407407 description = ''
408408- The memory size in megabytes of the virtual machine.
408408+ The memory size of the virtual machine in MiB (1024×1024 bytes).
409409 '';
410410 };
411411···480480 default = [ ];
481481 description = ''
482482 Additional disk images to provide to the VM. The value is
483483- a list of size in megabytes of each disk. These disks are
483483+ a list of size in MiB (1024×1024 bytes) of each disk. These disks are
484484 writeable by the VM.
485485 '';
486486 };
···11291129 {
11301130 assertion = pkgs.stdenv.hostPlatform.is32bit -> cfg.memorySize < 2047;
11311131 message = ''
11321132- virtualisation.memorySize is above 2047, but qemu is only able to allocate 2047MB RAM on 32bit max.
11321132+ virtualisation.memorySize is above 2047, but qemu is only able to allocate 2047 MiB RAM on 32bit max.
11331133 '';
11341134 }
11351135 {
+1-1
nixos/modules/virtualisation/waagent.nix
···174174 type = types.int;
175175 default = 0;
176176 description = ''
177177- Specifies the size of the swap file in megabytes.
177177+ Specifies the size of the swap file in MiB (1024×1024 bytes).
178178179179 This configuration has no effect if resource disk is managed by cloud-init.
180180 '';
···317317 # A bash script fragment that produces a disk image at `destination`.
318318 createEmptyImage =
319319 {
320320- # Disk image size in MiB
320320+ # Disk image size in MiB (1024*1024 bytes)
321321 size,
322322 # Name that will be written to ${destination}/nix-support/full-name
323323 fullName,
···358358 will build the derivation `patchelf' inside a VM. The attribute
359359 `preVM' can optionally contain a shell command to be evaluated
360360 *before* the VM is started (i.e., on the host). The attribute
361361- `memSize' specifies the memory size of the VM in megabytes,
362362- defaulting to 512. The attribute `diskImage' can optionally
363363- specify a file system image to be attached to /dev/sda. (Note
364364- that currently we expect the image to contain a filesystem, not a
365365- full disk image with a partition table etc.)
361361+ `memSize' specifies the memory size of the VM in MiB (1024*1024
362362+ bytes), defaulting to 512. The attribute `diskImage' can
363363+ optionally specify a file system image to be attached to /dev/sda.
364364+ (Note that currently we expect the image to contain a filesystem,
365365+ not a full disk image with a partition table etc.)
366366367367 If the build fails and Nix is run with the `-K' option, a script
368368 `run-vm' will be left behind in the temporary build directory
···12301230 `extraPackages' specifies the names of additional packages from
12311231 the distribution that should be included in the image; `packages'
12321232 allows the entire set of packages to be overridden; and `size'
12331233- sets the size of the disk in megabytes. E.g.,
12331233+ sets the size of the disk in MiB (1024*1024 bytes). E.g.,
12341234 `diskImageFuns.ubuntu1004x86_64 { extraPackages = ["firefox"];
12351235 size = 8192; }' builds an 8 GiB image containing Firefox in
12361236 addition to the default packages.
···368368369369 # HandleAbandonedError / SystemExit when run in sandbox
370370 "test_makedirs_raises_oserror__uses_temp_dir"
371371+ "test_no_root_dir_access__uses_temp_dir"
371372372373 # AssertionError: Not all requests have been executed
373374 "test_image_refs"
···567567 dotnet-sdk_2 = throw "'dotnet-sdk_2' has been renamed to/replaced by 'dotnetCorePackages.sdk_2_1'"; # Converted to throw 2024-10-17
568568 dotnet-sdk_3 = throw "'dotnet-sdk_3' has been renamed to/replaced by 'dotnetCorePackages.sdk_3_1'"; # Converted to throw 2024-10-17
569569 dotnet-sdk_5 = throw "'dotnet-sdk_5' has been renamed to/replaced by 'dotnetCorePackages.sdk_5_0'"; # Converted to throw 2024-10-17
570570+ dotnetenv = throw "'dotnetenv' has been removed because it was unmaintained in Nixpkgs"; # Added 2025-07-11
570571 downonspot = throw "'downonspot' was removed because upstream has been taken down by a cease and desist"; # Added 2025-01-25
571572 dozenal = throw "dozenal has been removed because it does not compile and only minimal functionality"; # Added 2025-03-30
572573 dstat = throw "'dstat' has been removed because it has been unmaintained since 2020. Use 'dool' instead."; # Added 2025-01-21
···13361337 netbox_3_5 = throw "netbox 3.5 series has been removed as it was EOL"; # Added 2024-01-22
13371338 netbox_3_7 = throw "netbox 3.7 series has been removed as it was EOL"; # Added 2025-04-23
13381339 nettools = net-tools; # Added 2025-06-11
13401340+ newt-go = fosrl-newt; # Added 2025-06-24
13391341 nextcloud29 = throw ''
13401342 Nextcloud v29 has been removed from `nixpkgs` as the support for is dropped
13411343 by upstream in 2025-04. Please upgrade to at least Nextcloud v30 by declaring