nixos/systemd-initrd: allow overriding initrdBin with extraBin

Being able to override `boot.initrd.systemd.initrdBin` with `boot.initrd.systemd.extraBin` is a desirable behavior, so this PR changes the `ln -s` command to `ln -sf` to force link even if the file already exists.
This commit is contained in:
Lily Foster 2023-02-23 13:23:15 -05:00
parent b69883faca
commit 5210ddc701
No known key found for this signature in database
GPG Key ID: 49340081E484C893

View File

@ -118,7 +118,7 @@ let
name = "initrd-bin-env";
paths = map getBin cfg.initrdBin;
pathsToLink = ["/bin" "/sbin"];
postBuild = concatStringsSep "\n" (mapAttrsToList (n: v: "ln -s '${v}' $out/bin/'${n}'") cfg.extraBin);
postBuild = concatStringsSep "\n" (mapAttrsToList (n: v: "ln -sf '${v}' $out/bin/'${n}'") cfg.extraBin);
};
initialRamdisk = pkgs.makeInitrdNG {