From 1d4f3e7661e4246bec2ba47aae4f17ec15528ce3 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 11 May 2024 18:33:18 +0200 Subject: fix(sys/boot): Use a disk backed directory to store the big iso --- sys/boot/default.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'sys/boot/default.nix') diff --git a/sys/boot/default.nix b/sys/boot/default.nix index 0a45fd08..d8f67fa3 100644 --- a/sys/boot/default.nix +++ b/sys/boot/default.nix @@ -17,10 +17,10 @@ nixosDir = "/EFI/nixos"; copyExtraFiles = '' - echo "[Systemd-boot] copying files to ${bootMountPoint}" - empty_file=$(mktemp) + echo "[systemd-boot] copying files to ${bootMountPoint}" + empty_file=$(mktemp) - ${lib.concatStrings (lib.mapAttrsToList (n: v: + ${lib.concatStrings (lib.mapAttrsToList (n: v: /* bash */ @@ -32,7 +32,7 @@ '') cfg.extraFiles)} - ${lib.concatStrings (lib.mapAttrsToList (n: v: + ${lib.concatStrings (lib.mapAttrsToList (n: v: /* bash */ @@ -49,6 +49,20 @@ in { copyExtraFilesForBoot = copyExtraFiles; }; + # Help lanzaboote with the filesystems + # source: https://github.com/nix-community/lanzaboote/issues/173#issuecomment-1532386210 + # TODO: Remove this workaround <2024-05-11> + fileSystems = { + "/efi/EFI/Linux" = { + device = "/boot/EFI/Linux"; + options = ["bind"]; + }; + "/efi/EFI/nixos" = { + device = "/boot/EFI/nixos"; + options = ["bind"]; + }; + }; + boot = { initrd = { #compressor = "lz4"; @@ -76,6 +90,8 @@ in { # for now. enable = false; + xbootldrMountPoint = "/boot"; + extraEntries = { "live.conf" = '' title Archlinux Live ISO -- cgit 1.4.1