add extra installation commands for systemd-boot
This commit is contained in:
parent
522fbe3254
commit
61994a499b
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue