separate hammerspoon and add installation instructions

This commit is contained in:
Noah Masur
2022-06-15 08:14:01 -04:00
parent 4e3054d91e
commit 89e2e52e44
6 changed files with 129 additions and 29 deletions

View File

@ -1,5 +1,5 @@
{ ... }: {
imports = [ ./system.nix ./tmux.nix ./utilities.nix ];
imports = [ ./system.nix ./tmux.nix ./utilities.nix ./hammerspoon.nix ];
}

View File

@ -0,0 +1,15 @@
{ config, ... }: {
# Hammerspoon - MacOS custom automation scripting
home-manager.users.${config.user} = {
xdg.configFile.hammerspoon = { source = ./hammerspoon; };
};
homebrew.casks = [ "hammerspoon" ];
system.activationScripts.hammerspoon.text = ''
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
'';
}

View File

@ -1,26 +1,23 @@
{ config, ... }: {
{ ... }: {
home-manager.users.${config.user} = {
homebrew = {
enable = true;
autoUpdate = false; # Don't update during rebuild
cleanup = "zap"; # Uninstall all programs not declared
taps = [
"homebrew/cask-drivers" # Used for Logitech G-Hub
];
brews = [
"trash" # Delete files and folders to trash instead of rm
];
casks = [
"scroll-reverser" # Different scroll style for mouse vs. trackpad
"meetingbar" # Show meetings in menu bar
"gitify" # Git notifications in menu bar
"hammerspoon" # MacOS custom automation scripting
"logitech-g-hub" # Mouse and keyboard management
];
global.brewfile = true; # Run brew bundle from anywhere
global.nolock = true; # Don't save lockfile (since running from anywhere)
};
homebrew = {
enable = true;
autoUpdate = false; # Don't update during rebuild
cleanup = "zap"; # Uninstall all programs not declared
taps = [
"homebrew/cask-drivers" # Used for Logitech G-Hub
];
brews = [
"trash" # Delete files and folders to trash instead of rm
];
casks = [
"scroll-reverser" # Different scroll style for mouse vs. trackpad
"meetingbar" # Show meetings in menu bar
"gitify" # Git notifications in menu bar
"logitech-g-hub" # Mouse and keyboard management
];
global.brewfile = true; # Run brew bundle from anywhere
global.nolock = true; # Don't save lockfile (since running from anywhere)
};
}

View File

@ -109,6 +109,7 @@
};
# Settings that don't have an option in nix-darwin
activationScripts.otherSettings.text = ''
echo "Disable disk image verification"
defaults write com.apple.frameworks.diskimages skip-verify -bool true

View File

@ -35,12 +35,6 @@
fonts.fonts = with pkgs;
[ (nerdfonts.override { fonts = [ "fira-mono" ]; }) ];
xdg.configFile.hammerspoon = { source = ./hammerspoon; };
};
system.activationScripts.hammerspoon.text = ''
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
'';
}