git.iko.soy/typeable/nixpkgs
on master help sign in
sd-image-x86_64: init
commit2cb7743e9c0f5c525c33ae2bccc7af30aefd97f0 authorZhaofeng Li <hello@zhaofeng.li> dateSat 16 Oct 2021, 08:58 (5 years ago) parentb70c23e
2 files changed+28−1
nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix+1−1 nixos/modules/installer/sd-card/sd-image-x86_64.nix+27
nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix+1−1
@@ -20,7 +20,7 @@
2020 };
2121
2222 boot.consoleLogLevel = lib.mkDefault 7;
23− boot.kernelParams = ["console=tty0" "console=ttyS0,115200n8"];
23+ boot.kernelParams = [ "console=tty0" "console=ttyS0,115200n8" ];
2424
2525 sdImage = {
2626 populateFirmwareCommands = "";
nixos/modules/installer/sd-card/sd-image-x86_64.nixnew file+27
@@ -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+}