Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Created October 27, 2017 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinlacewell-wk/9db0615990669877baf8cdb1256b30ca to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/9db0615990669877baf8cdb1256b30ca to your computer and use it in GitHub Desktop.
{ config, pkgs, lib, ... }:
with import <home-manager/modules/lib/dag.nix> { inherit lib; };
{
home.activation.hammerspoon = dagEntryAfter["linkgeneration"] (let
app = pkgs.fetchzip {
url = "https://github.com/Hammerspoon/hammerspoon/releases/download/0.9.57/Hammerspoon-0.9.57.zip";
sha256 = "12j9vylcxb7i3bn0v5x6zbxmnyyp7gh4am4vg48yv3hb54i73klx";
};
in ''
osascript << EOF
tell application "Finder"
set mySource to POSIX file "${app}" as alias
make new alias to mySource at POSIX file "${config.home.homeDirectory}/Applications/"
set name of result to "Hammerspoon.app"
end tell
EOF
'');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment