This commit is contained in:
mjallen18
2026-01-02 11:05:48 -06:00
parent 8fc40f265b
commit 1d5b1cf5e0
5 changed files with 67 additions and 19 deletions

View File

@@ -24,6 +24,8 @@ in
config = mkIf cfg.enable {
boot = {
kernelModules = [ "kvm" ];
binfmt = lib.mkIf isArm {
registrations."x86_64-linux" = {
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'';

View File

@@ -186,6 +186,11 @@ in
useGenerationDeviceTree = lib.mkOverride 60 (if cfg.bootType == "uefi" then false else true);
};
systemd-boot.enable = (if cfg.bootType == "uefi" then true else false);
systemd-boot.extraInstallCommands = let
bootloaderInstaller = (if cfg.bootType == "uefi" then (builder."uefi") else (builder."uboot")); # todo
in ''
${bootloaderInstaller} -f /boot/firmware -b /boot -c
'';
grub.enable = lib.mkForce false;
};
};

View File

@@ -42,9 +42,8 @@ if [ -n "$fwtarget" ]; then
@firmwareBuilder@ -c $default -d $fwtarget
echo "copying uefi firmware..."
#for file in "@uefi@/*"; do
rm -rf $fwtarget/*
copyForced @uefi@ $fwtarget/
#done
fi
echo "uefi bootloader installed"