add a package which populates a /boot dir with everything needed to read extlinux.conf on x86
this will replace our weird generic-extlinux-compatible wrapper in future patches.
This commit is contained in:
parent
d1aa9d190e
commit
065d139cbc
30
pkgs/bootpart-uefi-x86_64/default.nix
Normal file
30
pkgs/bootpart-uefi-x86_64/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{ stdenv, pkgs }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "bootpart-uefi-x86_64";
|
||||||
|
version = "1";
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.syslinux ];
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
installPhase = with pkgs; ''
|
||||||
|
# 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"
|
||||||
|
cp -R "${syslinux}/share/syslinux/efi64"/* "$out/EFI/syslinux"
|
||||||
|
echo "DEFAULT trampoline" > "$out/EFI/syslinux/syslinux.cfg"
|
||||||
|
echo "LABEL trampoline" >> "$out/EFI/syslinux/syslinux.cfg"
|
||||||
|
echo "CONFIG ../../extlinux/extlinux.conf ../../extlinux" >> "$out/EFI/syslinux/syslinux.cfg"
|
||||||
|
|
||||||
|
# create the EFI/BOOT/BOOTX64.EFI default entry
|
||||||
|
cp "$out/EFI/syslinux"/* "$out/EFI/BOOT"
|
||||||
|
mv "$out/EFI/BOOT/syslinux.efi" "$out/EFI/BOOT/BOOTX64.EFI"
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "unmanaged files to place in /boot on a x86-64 extlinux system";
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
sane-scripts = prev.callPackage ./sane-scripts { };
|
sane-scripts = prev.callPackage ./sane-scripts { };
|
||||||
tow-boot-pinephone = prev.callPackage ./tow-boot-pinephone { };
|
tow-boot-pinephone = prev.callPackage ./tow-boot-pinephone { };
|
||||||
tow-boot-rpi4 = prev.callPackage ./tow-boot-rpi4 { };
|
tow-boot-rpi4 = prev.callPackage ./tow-boot-rpi4 { };
|
||||||
|
bootpart-uefi-x86_64 = prev.callPackage ./bootpart-uefi-x86_64 { pkgs = prev; };
|
||||||
|
|
||||||
|
|
||||||
#### customized packages
|
#### customized packages
|
||||||
|
|
Loading…
Reference in New Issue
Block a user