1

fix mkLink bug (renew link)

This commit is contained in:
2022-09-02 19:40:53 +02:00
parent 5ae9129868
commit 225df216e1

View File

@ -17,11 +17,13 @@ rec {
(lib.mkIf (!pred) do); (lib.mkIf (!pred) do);
# Creates a symlink if it doesn't exist # Creates a symlink if it doesn't exist
# If it exists renew the link
mkLink = src: dest: mkLink = src: dest:
'' ''
if [ ! -L "${dest}" ]; then if [ -L "${dest}" ]; then
ln -sf ${src} ${dest} rm ${dest}
fi fi
ln -sf ${src} ${dest}
''; '';
# Removes a symlink if it exists # Removes a symlink if it exists