sd-image-x86_64: init
This commit is contained in:
parent
b70c23ea61
commit
2cb7743e9c
2 changed files with 28 additions and 1 deletions
|
@ -20,7 +20,7 @@
|
|||
};
|
||||
|
||||
boot.consoleLogLevel = lib.mkDefault 7;
|
||||
boot.kernelParams = ["console=tty0" "console=ttyS0,115200n8"];
|
||||
boot.kernelParams = [ "console=tty0" "console=ttyS0,115200n8" ];
|
||||
|
||||
sdImage = {
|
||||
populateFirmwareCommands = "";
|
||||
|
|
27
nixos/modules/installer/sd-card/sd-image-x86_64.nix
Normal file
27
nixos/modules/installer/sd-card/sd-image-x86_64.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
# To build, use:
|
||||
# nix-build nixos -I nixos-config=nixos/modules/installer/sd-card/sd-image-x86_64.nix -A config.system.build.sdImage
|
||||
|
||||
# This image is primarily used in NixOS tests (boot.nix) to test `boot.loader.generic-extlinux-compatible`.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../profiles/base.nix
|
||||
./sd-image.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
|
||||
boot.consoleLogLevel = lib.mkDefault 7;
|
||||
|
||||
sdImage = {
|
||||
populateFirmwareCommands = "";
|
||||
populateRootCommands = ''
|
||||
mkdir -p ./files/boot
|
||||
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue