Created
December 3, 2022 09:07
-
-
Save berryp/7af4a1f534027807b26fff706a61b1ce to your computer and use it in GitHub Desktop.
Have nix-darwin installed GUI show up in Spotlight
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
{ | |
# Import this module in your nix-darin config to have applications copied | |
# to /Applications/Nix Apps instead of being symlinked. GUI apps must be | |
# added to environment packages, not home-manager for this to work. | |
system.activationScripts.applications.text = lib.mkForce '' | |
echo "Setting up /Applications/Nix Apps" >&2 | |
appsSrc="${config.system.build.applications}/Applications/" | |
baseDir="/Applications/Nix Apps" | |
rsyncArgs="--archive --checksum --chmod=-w --copy-unsafe-links --delete" | |
mkdir -p "$baseDir" | |
${pkgs.rsync}/bin/rsync $rsyncArgs "$appsSrc" "$baseDir" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment