Created
February 10, 2018 20:45
-
-
Save dustinlacewell-wk/3493f53dec5934aacce81d750935d334 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 = mkIf cfg.enable { | |
home.packages = [ package ]; | |
home.file = listToAttrs configFiles; | |
home.activation.viscosity = dagEntryAfter["installPackages"] (let | |
home = config.home.homeDirectory; | |
applications = "${home}/.nix-profile/Applications"; | |
source = "${applications}/${appName}"; | |
target = "${home}/Applications/"; | |
in '' | |
if [ -e ${target}/${appName} ]; then | |
rm -r ${target}/${appName} | |
fi | |
osascript << EOF | |
tell application "Finder" | |
set mySource to POSIX file "${source}" as alias | |
make new alias to mySource at POSIX file "${target}" | |
set name of result to "${appName}" | |
end tell | |
EOF | |
''); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment