[Boot] fix last boot marking for Nixos 23.11 + fix issue when not booted into a specialization

This commit is contained in:
Antoine Viallon 2024-01-10 21:52:48 +01:00
parent 39edefcc88
commit 9c999a070d
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -318,6 +318,7 @@ in {
extraInstallCommands = let extraInstallCommands = let
efiDir = config.boot.loader.efi.efiSysMountPoint; efiDir = config.boot.loader.efi.efiSysMountPoint;
in '' in ''
export PATH="$PATH:${getBin pkgs.coreutils-full}/bin:${getBin pkgs.gnused}/bin"
rpath= rpath=
generation= generation=
specialization= specialization=
@ -329,9 +330,10 @@ in {
echo "Good path: $path" echo "Good path: $path"
ok=true ok=true
fi fi
for specialization in "$path"/specialisation/*; do for spec in "$path"/specialisation/*; do
if [ "$(realpath $specialization)" = "$boot_generation_path" ]; then if [ "$(realpath $spec)" = "$boot_generation_path" ]; then
ok=true ok=true
specialization="$spec"
echo "Good specialization: $specialization" echo "Good specialization: $specialization"
break break
fi fi