make extlinux work with liminix-rebuild

add /boot to the systemConfiguration closure
This commit is contained in:
Daniel Barlow 2024-01-08 18:58:07 +00:00
parent 9a3d7a387e
commit c1101d3af5
3 changed files with 21 additions and 5 deletions

View file

@ -84,8 +84,19 @@ in attrset:
#!/bin/sh -e
prefix=\''${1-/}
src=\''${prefix}$out
mkdir -p \$prefix/persist
cp -v -fP \$src/bin/* \$src/etc/* \$prefix/persist
dest=\$prefix
${# if we are running on a normal mounted system then
# the actual device root is mounted on /persist
# and /nix is bind mounted from /persist/nix
# (see the code in preinit). So we need to check for this
# case otherwise we will install into a ramfs/rootfs
""
}
if test -d $dest/persist; then dest=$dest/persist; fi
cp -v -fP \$src/bin/* \$src/etc/* \$dest
${if attrset ? boot then ''
(cd \$prefix && rm ./boot && ln -sf ${lib.strings.removePrefix "/" attrset.boot.target} ./boot)
'' else ""}
EOF
chmod +x $out/bin/install
'';