My nix-darwin and NixOS config
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: use modern commands for the Launch Services database

+4 -3
+4 -3
modules/darwin/launch-services.nix
··· 14 14 system.activationScripts.postActivation.text = lib.mkAfter '' 15 15 echo "Rebuilding Launch Services database..." >&2 16 16 17 - # Clear and rebuild the Launch Services database 17 + # Modern approach: garbage collect and rescan all domains 18 18 # This ensures all Nix apps are properly registered with macOS 19 + # Using -gc (garbage collect) instead of deprecated -kill flag 19 20 /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \ 20 - -kill -r -domain local -domain system -domain user 21 + -gc -R -apps u,s,l 2>/dev/null || true 21 22 22 23 # Reset Launchpad cache to show updated apps 23 24 # This is necessary for apps to appear in Spotlight and Launchpad 24 25 find /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} + 2>/dev/null || true 25 26 26 27 # Restart Dock to apply changes 27 - killall Dock || true 28 + killall Dock 2>/dev/null || true 28 29 29 30 echo "Launch Services database rebuilt successfully" >&2 30 31 '';