fix(nix): move yabai, skhd, and karabiner-elements to homebrew

This commit is contained in:
Stefan Imhoff
2024-08-02 16:22:22 +02:00
parent b43d736e3f
commit 208d9a3159
8 changed files with 14 additions and 49 deletions

View File

@@ -5,7 +5,6 @@
# Auto upgrade nix package and the daemon service. # Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
services.karabiner-elements.enable = true;
# Necessary for using flakes on this system. # Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes"; nix.settings.experimental-features = "nix-command flakes";
@@ -16,7 +15,6 @@
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
environment.systemPackages = [ pkgs.pinentry_mac ];
# Shells # Shells
environment.shells = with pkgs; [ environment.shells = with pkgs; [
@@ -196,8 +194,4 @@
# Additional system configurations # Additional system configurations
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3; system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
system.defaults.NSGlobalDomain.AppleFontSmoothing = 2; system.defaults.NSGlobalDomain.AppleFontSmoothing = 2;
# Services
services.skhd.enable = true;
services.yabai.enable = true;
} }

View File

@@ -5,6 +5,7 @@
"dustinblackman/tap" # Oatmeal "dustinblackman/tap" # Oatmeal
"homebrew/bundle" # Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, Whalebrew and Visual Studio Code. "homebrew/bundle" # Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, Whalebrew and Visual Studio Code.
"homebrew/services" # Manage background services using the daemon manager launchctl on macOS or systemctl on Linux. "homebrew/services" # Manage background services using the daemon manager launchctl on macOS or systemctl on Linux.
"koekeishiya/formulae" # yabai/skhd
]; ];
brews = [ brews = [
"asdf" # Extendable version manager with support for Ruby, Node.js, Erlang & more "asdf" # Extendable version manager with support for Ruby, Node.js, Erlang & more
@@ -16,10 +17,13 @@
"luajit" # INFO: Dependency of Neovim "luajit" # INFO: Dependency of Neovim
"neovim" # TODO: Migrate to nix "neovim" # TODO: Migrate to nix
"oatmeal" # Terminal UI to chat with large language models (LLM) using backends such as Ollama, and direct integrations with your favourite editor like Neovim! "oatmeal" # Terminal UI to chat with large language models (LLM) using backends such as Ollama, and direct integrations with your favourite editor like Neovim!
"pinentry-mac" # Pinentry for GPG
"prettier" # Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML "prettier" # Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML
"skhd" # Simple hotkey daemon for macOS
"tree-sitter" # INFO: Dependency of Neovim "tree-sitter" # INFO: Dependency of Neovim
"urlview" # URL extractor/launcher "urlview" # URL extractor/launcher
"volta" # JavaScript toolchain manager for reproducible environments "volta" # JavaScript toolchain manager for reproducible environments
"yabai" # Tiling window manager for macOS based on binary space partitioning
"yarn" # JavaScript package manager "yarn" # JavaScript package manager
]; ];
casks = [ casks = [
@@ -67,6 +71,7 @@
"itsycal" # Menu bar calendar "itsycal" # Menu bar calendar
"kaleidoscope@3" # Spot and merge differences in text and image files or folders "kaleidoscope@3" # Spot and merge differences in text and image files or folders
"kap" # Open-source screen recorder built with web technology "kap" # Open-source screen recorder built with web technology
"karabiner-elements" # Keyboard customisation tool
"languagetool" # Grammar, spelling and style suggestions in all the writing apps "languagetool" # Grammar, spelling and style suggestions in all the writing apps
"ledger-live" # Wallet desktop application to maintain multiple cryptocurrencies "ledger-live" # Wallet desktop application to maintain multiple cryptocurrencies
"macfuse" # File system integration "macfuse" # File system integration

View File

@@ -4,6 +4,4 @@
home.file.".config/karabiner/" = { home.file.".config/karabiner/" = {
source = ./karabiner; source = ./karabiner;
}; };
home.packages = [ pkgs.karabiner-elements ];
} }

View File

@@ -1,16 +1,7 @@
{ pkgs, config, lib, ... }: { ... }:
{ {
options.services.skhd = { home.file = {
enable = lib.mkEnableOption "skhd"; ".config/skhd/skhdrc" = { source = ./skhdrc; };
};
config = {
home.file.".config/skhd/skhdrc" = lib.mkIf
config.services.skhd.enable
{
source = ./skhdrc;
onChange = "${pkgs.killall}/bin/killall skhd";
};
}; };
} }

View File

@@ -1,16 +1,7 @@
{ pkgs, config, lib, ... }: { ... }:
{ {
options.services.yabai = { home.file = {
enable = lib.mkEnableOption "yabai"; ".config/yabai/yabairc" = { source = ./yabairc; };
};
config = {
home.file.".config/yabai/yabairc" = lib.mkIf
config.services.yabai.enable
{
source = ./yabairc;
onChange = "${pkgs.killall}/bin/killall yabai";
};
}; };
} }

View File

@@ -8,17 +8,11 @@ yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off yabai -m config focus_follows_mouse off
yabai -m config window_origin_display default yabai -m config window_origin_display default
yabai -m config window_placement second_child yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_shadow on yabai -m config window_shadow on
yabai -m config window_opacity off yabai -m config window_opacity off
yabai -m config window_opacity_duration 0.0 yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1.0 yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.90 yabai -m config normal_window_opacity 0.90
yabai -m config window_border off
yabai -m config window_border_width 6
yabai -m config active_window_border_color 0xff775759
yabai -m config normal_window_border_color 0xff555555
yabai -m config insert_feedback_color 0xffd75f5f
yabai -m config split_ratio 0.70 yabai -m config split_ratio 0.70
yabai -m config auto_balance off yabai -m config auto_balance off
yabai -m config mouse_modifier fn yabai -m config mouse_modifier fn
@@ -53,8 +47,8 @@ yabai -m rule --add app="Dropbox Dash" manage=off
yabai -m rule --add app="Proton Pass" manage=off yabai -m rule --add app="Proton Pass" manage=off
yabai -m rule --add app="Pika" manage=off yabai -m rule --add app="Pika" manage=off
yabai -m rule --add app="Microsoft Teams" manage=off yabai -m rule --add app="Microsoft Teams" manage=off
yabai -m rule --add app="CleanShot X" manage=off mouse_follows_focus=off layer=above yabai -m rule --add app="CleanShot X" manage=off mouse_follows_focus=off
yabai -m rule --add app="^Dash$" sticky=on layer=above manage=off yabai -m rule --add app="^Dash$" sticky=on manage=off
yabai -m rule --add app="^IINA$" sticky=on layer=above manage=off yabai -m rule --add app="^IINA$" sticky=on manage=off
echo "Yabai configuration loaded …" echo "Yabai configuration loaded …"

View File

@@ -5,10 +5,6 @@
../../home ../../home
]; ];
# Services
services.yabai.enable = true;
services.skhd.enable = true;
# The home.packages option allows you to install Nix packages into your # The home.packages option allows you to install Nix packages into your
# environment. # environment.
home.packages = with pkgs; [ home.packages = with pkgs; [

View File

@@ -5,10 +5,6 @@
../../home ../../home
]; ];
# Services
services.yabai.enable = true;
services.skhd.enable = true;
# The home.packages option allows you to install Nix packages into your # The home.packages option allows you to install Nix packages into your
# environment. # environment.
home.packages = with pkgs; [ ]; home.packages = with pkgs; [ ];