28 lines
489 B
Nix
Raw Permalink Normal View History

2025-01-20 22:35:40 -05:00
{
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
'';
};
}