From 0cf7d413898a975097a196e5ddb3f6a0f214234b Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Tue, 28 Mar 2023 14:41:04 -0300 Subject: [PATCH] fix(modules/fonts): ignore repeated fonts Without this, attempts to build the fonts dir with repeated font packages in `fonts.fonts` will yield: ``` ln: failed to create symbolic link '/nix/store/6im9rm87nxc82nqbv350hfp2w7ja1z47-fonts/Library/Fonts/IBMPlexSansThai-Thin.otf': File exists ``` --- modules/fonts/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/fonts/default.nix b/modules/fonts/default.nix index 44ea58b..0f4c269 100644 --- a/modules/fonts/default.nix +++ b/modules/fonts/default.nix @@ -38,7 +38,7 @@ in mkdir -p $out/Library/Fonts for path in $paths; do find -L $path/share/fonts -type f -print0 | while IFS= read -rd "" f; do - ln -s "$f" $out/Library/Fonts + ln -sf "$f" $out/Library/Fonts done done '';