My nix-darwin and NixOS config
3
fork

Configure Feed

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

fix: symlink Applications on nix-darwin

+33
+1
hosts/macmini/default.nix
··· 9 9 ../../modules/darwin/packages.nix 10 10 ../../modules/darwin/homebrew.nix 11 11 ../../modules/darwin/system.nix 12 + ../../modules/darwin/launch-services.nix 12 13 ]; 13 14 14 15 # Primary user for homebrew and user-specific options
+31
modules/darwin/launch-services.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + ############################################################################## 4 + # Launch Services Management for macOS 5 + # 6 + # Automatically rebuilds the Launch Services database after system activation 7 + # to ensure Nix-installed applications are properly registered with macOS. 8 + # 9 + # This solves issues where apps show "can't be opened" errors because 10 + # macOS doesn't recognize apps from the Nix store or symlinked locations. 11 + ############################################################################## 12 + 13 + { 14 + system.activationScripts.postActivation.text = lib.mkAfter '' 15 + echo "Rebuilding Launch Services database..." >&2 16 + 17 + # Clear and rebuild the Launch Services database 18 + # This ensures all Nix apps are properly registered with macOS 19 + /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \ 20 + -kill -r -domain local -domain system -domain user 21 + 22 + # Reset Launchpad cache to show updated apps 23 + # This is necessary for apps to appear in Spotlight and Launchpad 24 + find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} + || true 25 + 26 + # Restart Dock to apply changes 27 + killall Dock || true 28 + 29 + echo "Launch Services database rebuilt successfully" >&2 30 + ''; 31 + }
+1
settings/config/darwin.nix
··· 94 94 "microsoft-word" 95 95 "netnewswire" 96 96 "prismlauncher" 97 + "spotify" 97 98 "tailscale-app" # VPN for inter-host communication 98 99 "element" # Matrix client 99 100 ];