1# To build, use:
2# nix-build nixos -I nixos-config=nixos/modules/installer/sd-card/sd-image-x86_64.nix -A config.system.build.sdImage
3
4# This image is primarily used in NixOS tests (boot.nix) to test `boot.loader.generic-extlinux-compatible`.
5{
6 config,
7 lib,
8 pkgs,
9 ...
10}:
11
12{
13 imports = [
14 ../../profiles/base.nix
15 ./sd-image.nix
16 ];
17
18 boot.loader = {
19 grub.enable = false;
20 generic-extlinux-compatible.enable = true;
21 };
22
23 boot.consoleLogLevel = lib.mkDefault 7;
24
25 sdImage = {
26 populateFirmwareCommands = "";
27 populateRootCommands = ''
28 mkdir -p ./files/boot
29 ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
30 '';
31 };
32}