mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 08:42:02 +00:00
28 lines
489 B
Nix
28 lines
489 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.nmasur.presets.services.hammerspoon;
|
|
in
|
|
|
|
{
|
|
|
|
options.nmasur.presets.services.hammerspoon.enable =
|
|
lib.mkEnableOption "Hammerspoon macOS automation";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
homebrew.casks = [ "hammerspoon" ];
|
|
|
|
system.activationScripts.postUserActivation.text = ''
|
|
defaults write org.hammerspoon.Hammerspoon MJConfigFile "${config.homePath}/.config/hammerspoon/init.lua"
|
|
sudo killall Dock
|
|
'';
|
|
|
|
};
|
|
|
|
}
|