arch linux systemd-boot+secure boot signing
This commit is contained in:
parent
cdfcd1804f
commit
faf0174638
1 changed files with 18 additions and 13 deletions
|
|
@ -15,18 +15,23 @@
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
/* GRUB disabled for Secure Boot (Lanzaboote)
|
# Arch Linux systemd-boot entry
|
||||||
boot.loader.grub = {
|
# Copies kernel/initramfs from Arch btrfs partition to ESP and creates loader entry
|
||||||
enable = true;
|
system.activationScripts.archBoot = let
|
||||||
device = "nodev";
|
archEntry = pkgs.writeText "arch.conf" ''
|
||||||
efiSupport = true;
|
title Arch Linux
|
||||||
extraEntries = ''
|
linux /arch/vmlinuz-linux
|
||||||
menuentry "Arch Linux (default)" {
|
initrd /arch/initramfs-linux.img
|
||||||
search --set=root --fs-uuid 15ae8384-3dfc-4915-9201-66ecfc5f230d
|
options root=UUID=15ae8384-3dfc-4915-9201-66ecfc5f230d rootflags=subvol=@ rw
|
||||||
linux /@/boot/vmlinuz-linux root=UUID=15ae8384-3dfc-4915-9201-66ecfc5f230d rootflags=subvol=@ rw
|
|
||||||
initrd /@/boot/initramfs-linux.img
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
};
|
in ''
|
||||||
*/
|
mkdir -p /boot/arch
|
||||||
|
if mountpoint -q /mnt/arch; then
|
||||||
|
cp /mnt/arch/boot/vmlinuz-linux /boot/arch/vmlinuz-linux
|
||||||
|
cp /mnt/arch/boot/initramfs-linux.img /boot/arch/initramfs-linux.img
|
||||||
|
${pkgs.sbctl}/bin/sbctl sign /boot/arch/vmlinuz-linux
|
||||||
|
fi
|
||||||
|
mkdir -p /boot/loader/entries
|
||||||
|
cp ${archEntry} /boot/loader/entries/arch.conf
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue