mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 01:53:09 +09:00
nixos: Cut off virtualisation.vmVariant.virtualisation.vmVariant
This produced an unnecessarily infinitely deep config tree. The "cut off" option can be written to, but not read from. Being written to is important, because it allows users to conveniently define vmVariant config without having to check isVmVariant. There's a small chance that someone *reads* from vmVariant config in their normal config, and for them it will not be possible to evaluate with `nixos-rebuild build-vm` anymore. If this is a problem, we could perhaps make the vmVariant root appear instead of the `throw` error. This could also be done using mkOption apply.
This commit is contained in:
parent
527fcd5419
commit
9aab8b86c7
1 changed files with 12 additions and 0 deletions
|
@ -58,6 +58,18 @@ in
|
|||
vmWithBootLoader = lib.mkDefault config.virtualisation.vmVariantWithBootLoader.system.build.vm;
|
||||
};
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
options = {
|
||||
virtualisation.vmVariant = lib.mkOption {
|
||||
apply = _: throw "virtualisation.vmVariant*.virtualisation.vmVariant is not supported";
|
||||
};
|
||||
virtualisation.vmVariantWithBootLoader = lib.mkOption {
|
||||
apply =
|
||||
_: throw "virtualisation.vmVariant*.virtualisation.vmVariantWithBootloader is not supported";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# uses extendModules
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue