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