mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/qemu-vm: Warn when wasting space
This commit is contained in:
parent
7ba6f74c1c
commit
438f6f17de
1 changed files with 22 additions and 0 deletions
|
@ -17,6 +17,8 @@ let
|
||||||
|
|
||||||
cfg = config.virtualisation;
|
cfg = config.virtualisation;
|
||||||
|
|
||||||
|
opt = options.virtualisation;
|
||||||
|
|
||||||
qemu = cfg.qemu.package;
|
qemu = cfg.qemu.package;
|
||||||
|
|
||||||
consoles = lib.concatMapStringsSep " " (c: "console=${c}") cfg.qemu.consoles;
|
consoles = lib.concatMapStringsSep " " (c: "console=${c}") cfg.qemu.consoles;
|
||||||
|
@ -767,6 +769,26 @@ in
|
||||||
}
|
}
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
warnings =
|
||||||
|
optional (
|
||||||
|
cfg.writableStore &&
|
||||||
|
cfg.useNixStoreImage &&
|
||||||
|
opt.writableStore.highestPrio > lib.modules.defaultPriority)
|
||||||
|
''
|
||||||
|
You have enabled ${opt.useNixStoreImage} = true,
|
||||||
|
without setting ${opt.writableStore} = false.
|
||||||
|
|
||||||
|
This causes a store image to be written to the store, which is
|
||||||
|
costly, especially for the binary cache, and because of the need
|
||||||
|
for more frequent garbage collection.
|
||||||
|
|
||||||
|
If you really need this combination, you can set ${opt.writableStore}
|
||||||
|
explicitly to false, incur the cost and make this warning go away.
|
||||||
|
Otherwise, we recommend
|
||||||
|
|
||||||
|
${opt.writableStore} = false;
|
||||||
|
'';
|
||||||
|
|
||||||
# Note [Disk layout with `useBootLoader`]
|
# Note [Disk layout with `useBootLoader`]
|
||||||
#
|
#
|
||||||
# If `useBootLoader = true`, we configure 2 drives:
|
# If `useBootLoader = true`, we configure 2 drives:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue