Skip to content

Commit 3e2f6fd

Browse files
committed
Don't use systemd-boot or qemu-img from host
1 parent 7d5120f commit 3e2f6fd

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

base/debloat.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ debloat_paths=(
3636
"/usr/lib/tmpfiles.d"
3737
"/etc/systemd/network"
3838
"/etc/credstore"
39+
"/nix"
3940
)
4041

4142
for p in "${debloat_paths[@]}"; do rm -rf "$BUILDROOT$p"; done

base/efi-stub.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,11 @@ SYSTEMD_BOOT_URL="https://snapshot.debian.org/archive/debian/20240314T094714Z/po
66
TEMP_DEB="$BUILDROOT/systemd-boot.deb"
77
curl -L -o "$TEMP_DEB" "$SYSTEMD_BOOT_URL"
88
mkosi-chroot dpkg -i /systemd-boot.deb
9-
rm -f "$TEMP_DEB"
9+
rm -f "$TEMP_DEB"
10+
11+
# Copy the efi stub to the place where bootctl expects it
12+
bootctl="$(which -a bootctl | grep /nix | head -n 1)"
13+
nix_dir="$(dirname $(dirname $bootctl))"
14+
boot_dir="lib/systemd/boot"
15+
mkosi-chroot mkdir -p $nix_dir/$boot_dir
16+
mkosi-chroot cp -r /usr/$boot_dir/efi $nix_dir/$boot_dir/efi

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
extraDeps = with pkgs; [
2929
apt dpkg gnupg debootstrap
3030
squashfsTools dosfstools e2fsprogs mtools mustache-go
31-
cryptsetup util-linux zstd
31+
cryptsetup util-linux zstd which qemu-utils
3232
] ++ [ reprepro ];
3333
};
3434
in {

0 commit comments

Comments
 (0)