@@ -0,0 +1,27 @@
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+{ config, lib, pkgs, ... }:
6+
7+{
8+ imports = [
9+ ../../profiles/base.nix
10+ ./sd-image.nix
11+ ];
12+
13+ boot.loader = {
14+ grub.enable = false;
15+ generic-extlinux-compatible.enable = true;
16+ };
17+
18+ boot.consoleLogLevel = lib.mkDefault 7;
19+
20+ sdImage = {
21+ populateFirmwareCommands = "";
22+ populateRootCommands = ''
23+ mkdir -p ./files/boot
24+ ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
25+ '';
26+ };
27+}