bootpart-uefi-x86_64: split the configs into their own files in src
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
DEFAULT trampoline
|
||||||
|
LABEL trampoline
|
||||||
|
SAY trampoline into generic extlinux.conf
|
||||||
|
CONFIG ../../syslinux/syslinux.cfg ../../syslinux
|
@@ -4,28 +4,22 @@ stdenv.mkDerivation {
|
|||||||
pname = "bootpart-uefi-x86_64";
|
pname = "bootpart-uefi-x86_64";
|
||||||
version = "1";
|
version = "1";
|
||||||
|
|
||||||
buildInputs = [ syslinux ];
|
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
# populate the EFI directory with syslinux, and configure it to read that extlinux.conf file managed by nixos
|
# populate the EFI directory with syslinux, and configure it to read that extlinux.conf file managed by nixos
|
||||||
mkdir -p "$out/EFI/syslinux" "$out/EFI/BOOT" "$out/syslinux"
|
mkdir -p $out/EFI/syslinux $out/EFI/BOOT $out/syslinux
|
||||||
cp -R "${syslinux}/share/syslinux/efi64"/* "$out/EFI/syslinux"
|
cp -R ${syslinux}/share/syslinux/efi64/* $out/EFI/syslinux
|
||||||
echo "DEFAULT trampoline" > "$out/EFI/syslinux/syslinux.cfg"
|
install -Dm644 ${./EFI/syslinux/syslinux.cfg} $out/EFI/syslinux/syslinux.cfg
|
||||||
echo "LABEL trampoline" >> "$out/EFI/syslinux/syslinux.cfg"
|
|
||||||
echo " SAY trampoline into generic extlinux.conf" >> "$out/EFI/syslinux/syslinux.cfg"
|
|
||||||
echo " CONFIG ../../syslinux/syslinux.cfg ../../syslinux" >> "$out/EFI/syslinux/syslinux.cfg"
|
|
||||||
|
|
||||||
# we create this "trampoline" layer so that we can setup the UI directive
|
# we create this "trampoline" layer so that we can setup the UI directive
|
||||||
# and enable a menu before loading the real, nixos-managed extlinux.conf
|
# and enable a menu before loading the real, nixos-managed extlinux.conf
|
||||||
cp "${syslinux}/share/syslinux/efi64/menu.c32" "$out/syslinux/menu.c32"
|
cp ${syslinux}/share/syslinux/efi64/menu.c32 $out/syslinux/menu.c32
|
||||||
echo "UI menu.c32" > "$out/syslinux/syslinux.cfg"
|
install -Dm644 ${./syslinux/syslinux.cfg} $out/syslinux/syslinux.cfg
|
||||||
echo "INCLUDE ../extlinux/extlinux.conf" >> "$out/syslinux/syslinux.cfg"
|
|
||||||
|
|
||||||
# create the EFI/BOOT/BOOTX64.EFI default entry
|
# create the EFI/BOOT/BOOTX64.EFI default entry
|
||||||
cp "$out/EFI/syslinux"/* "$out/EFI/BOOT"
|
cp $out/EFI/syslinux/* $out/EFI/BOOT
|
||||||
mv "$out/EFI/BOOT/syslinux.efi" "$out/EFI/BOOT/BOOTX64.EFI"
|
mv $out/EFI/BOOT/syslinux.efi $out/EFI/BOOT/BOOTX64.EFI
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
2
pkgs/by-name/bootpart-uefi-x86_64/syslinux/syslinux.cfg
Normal file
2
pkgs/by-name/bootpart-uefi-x86_64/syslinux/syslinux.cfg
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
UI menu.c32
|
||||||
|
INCLUDE ../extlinux/extlinux.conf
|
Reference in New Issue
Block a user