add extra installation commands for systemd-boot

This commit is contained in:
Charlotte 🦝 Delenk 2024-07-02 19:30:05 +02:00
parent 522fbe3254
commit 61994a499b

View file

@ -88,4 +88,14 @@
};
system.stateVersion = "24.05";
boot.loader.systemd-boot.extraInstallCommands = ''
set -euo pipefail
${pkgs.coreutils}/bin/cp --no-preserve=mode -r ${config.hardware.deviceTree.package} ${config.boot.loader.efi.efiSysMountPoint}/
for filename in ${config.boot.loader.efi.efiSysMountPoint}/loader/entries/nixos*-generation-[1-9]*.conf; do
if ! ${pkgs.gnugrep}/bin/grep -q 'devicetree' $filename; then
${pkgs.coreutils}/bin/echo "devicetree /dtbs/${config.hardware.deviceTree.name}" >> $filename
fi
done
'';
}