Created
October 27, 2017 18:24
-
-
Save dustinlacewell-wk/b62ae41678db31c39a75a7f6ca917a01 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, pkgs, lib, ... }: | |
with import <home-manager/modules/lib/dag.nix> { inherit lib; }; | |
{ | |
home.packages = [ pkgs.fetchzip { | |
name = "Applications/Hammerspoon.app"; | |
url = "https://github.com/Hammerspoon/hammerspoon/releases/download/0.9.57/Hammerspoon-0.9.57.zip"; | |
sha256 = "12j9vylcxb7i3bn0v5x6zbxmnyyp7gh4am4vg48yv3hb54i73klx"; | |
}]; | |
home.activation.hammerspoon = dagEntryAfter["linkgeneration"] (let | |
linkName = "Hammerspoon.app" | |
home = config.home.homeDirectory; | |
applications = "${home}/.nix-profile/Applications"; | |
source = "${applications}/${linkName}"; | |
target = "${home}/Applications/"; | |
in '' | |
rm -f ${} | |
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 "${linkName}" | |
end tell | |
EOF | |
''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment