1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-09 09:36:20 +09:00

manual: explain per-variant customizations for build-image

This commit is contained in:
phaer 2025-04-14 10:00:35 +02:00
parent e0afcb011b
commit ca65b55350
2 changed files with 14 additions and 0 deletions

View file

@ -14,3 +14,14 @@ nixos-image-amazon-25.05pre-git-x86_64-linux.vhd nix-support
To get a list of all variants available, run `nixos-rebuild build-image` without arguments.
## Customize specific image variants {#sec-image-nixos-rebuild-build-image-customize}
The `image.modules` option can be used to set specific options per image variant, in a similar fashion as [specialisations](options.html#opt-specialisation) for generic nixos configurations.
E.g. images for the cloud provider Linode use `grub2` as a bootloader by default. If you are using `systemd-boot` on other platforms and want to disable it for Linode onlz, you could use the following options:
``` nix
image.modules.linode = {
boot.loader.systemd-boot.enable = lib.mkForce false;
};
```