diff --git a/pkgs/systemconfig/default.nix b/pkgs/systemconfig/default.nix index 8ec00aa..f6f38b1 100644 --- a/pkgs/systemconfig/default.nix +++ b/pkgs/systemconfig/default.nix @@ -92,10 +92,13 @@ in attrset: # case otherwise we will install into a ramfs/rootfs "" } - if test -d $dest/persist; then dest=$dest/persist; fi + if test -d \$dest/persist; then dest=\$dest/persist; fi cp -v -fP \$src/bin/* \$src/etc/* \$dest ${if attrset ? boot then '' - (cd \$dest && rm ./boot && ln -sf ${lib.strings.removePrefix "/" attrset.boot.target} ./boot) + (cd \$dest + if test -e boot ; then rm boot ; fi + ln -sf ${lib.strings.removePrefix "/" attrset.boot.target} ./boot + ) '' else ""} EOF chmod +x $out/bin/install