{ config, pkgs, ... }: let home-manager = builtins.fetchTarball { url = "https://github.com/nix-community/home-manager/archive/master.tar.gz"; }; choose-pass = pkgs.callPackage ./macos/choose-pass.nix { inherit config pkgs; }; in { imports = [ "${home-manager}/nix-darwin" ]; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget # environment.systemPackages = [ ]; environment.systemPackages = [ choose-pass pkgs.coreutils-full pkgs.curl pkgs.fzf pkgs.gnupg pkgs.google-cloud-sdk pkgs.htop pkgs.jq pkgs.mosh pkgs.pass pkgs.ripgrep pkgs.terraform pkgs.wireguard pkgs.yubikey-personalization ]; # Use a custom configuration.nix location. # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix # environment.darwinConfig = "$HOME/configs/nix/darwin-configuration.nix"; # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; # nix.package = pkgs.nix; # Create /etc/bashrc that loads the nix-darwin environment. programs.zsh.enable = true; # default shell on catalina # programs.fish.enable = true; # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; homebrew = { enable = true; autoUpdate = true; cleanup = "zap"; global = { brewfile = true; noLock = true; }; casks = [ "kmbmpdc" "librewolf" ]; brews = [ "mpd" "choose-gui" "vitetris" ]; taps = [ "homebrew/bundle" "homebrew/cask" "homebrew/core" "homebrew/services" ]; }; fonts = { enableFontDir = true; fonts = [ (pkgs.nerdfonts.override { fonts = [ "Hack" "MPlus" ]; }) pkgs.inter pkgs.hack-font pkgs.libertinus ]; }; users.users.rilla = { name = "rilla"; home = "/Users/rilla"; }; services.yabai = { enable = true; package = pkgs.yabai; # enableScriptingAddition = true; enableScriptingAddition = false; config = { external_bar = "all:28:0"; layout = "bsp"; auto_balance = "off"; mouse_modifier = "fn"; mouse_action1 = "move"; mouse_action2 = "resize"; mouse_follows_focus = "on"; focus_follows_mouse = "autoraise"; window_topmost = "on"; # floating windows always on top window_shadow = "float"; window_opacity = "on"; active_window_opacity = "1.0"; normal_window_opacity = "1.0"; window_border = "on"; window_border_width = 8; active_window_border_color = "0xff458588"; normal_window_border_color = "0xff504945"; }; extraConfig = '' yabai -m rule --add app="^choose" manage=off ''; }; services.skhd = { enable = true; package = pkgs.skhd; skhdConfig = '' # ctrl + alt - return : osascript /Users/rilla/configs/scripts/osascripts/iterm.scpt ctrl + alt - return : ${pkgs.alacritty}/bin/alacritty ctrl + alt - 1 : yabai -m space --focus 1 ctrl + alt - 2 : yabai -m space --focus 2 ctrl + alt - 3 : yabai -m space --focus 3 ctrl + alt - 4 : yabai -m space --focus 4 ctrl + alt - 5 : yabai -m space --focus 5 ctrl + alt - 6 : yabai -m space --focus 6 ctrl + alt - 7 : yabai -m space --focus 7 ctrl + alt - 8 : yabai -m space --focus 8 ctrl + alt - 9 : yabai -m space --focus 9 ctrl + alt - 0 : yabai -m space --focus 10 ctrl + alt - n : yabai -m window --focus next || yabai -m window --focus first ctrl + alt - p : yabai -m window --focus prev || yabai -m window --focus last ctrl + alt + shift - r : yabai -m space --rotate 90 ctrl + alt + shift - 1 : yabai -m window --space 1 ctrl + alt + shift - 2 : yabai -m window --space 2 ctrl + alt + shift - 3 : yabai -m window --space 3 ctrl + alt + shift - 4 : yabai -m window --space 4 ctrl + alt + shift - 5 : yabai -m window --space 5 ctrl + alt + shift - 6 : yabai -m window --space 6 ctrl + alt + shift - 7 : yabai -m window --space 7 ctrl + alt + shift - 8 : yabai -m window --space 8 ctrl + alt + shift - 9 : yabai -m window --space 9 # ctrl + alt + shift - space : yabai -m space --balance ctrl + alt - space : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .["type"] == "bsp" then "float" else "bsp" end') ctrl + alt - b : yabai -m space --balance ctrl + alt + shift - space : yabai -m space --layout bsp # ctrl + alt + shift - c : yabai -m window --close ctrl + alt - right : yabai -m space --focus next || yabai -m space --focus first ctrl + alt - left : yabai -m space --focus prev || yabai -m space --focus last ctrl + alt - h : yabai -m window --focus west ctrl + alt - l : yabai -m window --focus east ctrl + alt - j : yabai -m window --focus south ctrl + alt - k : yabai -m window --focus north ctrl + alt + shift - h : yabai -m window --swap west ctrl + alt + shift - l : yabai -m window --swap east ctrl + alt + shift - j : yabai -m window --swap south ctrl + alt + shift - k : yabai -m window --swap north ctrl + alt - e : yabai -m display --focus 1 ctrl + alt - w : yabai -m display --focus 2 ctrl + alt - g : yabai -m space --toggle gap && yabai -m space --toggle padding ctrl + alt - x : yabai -m space --mirror y-axis ctrl + alt - y : yabai -m space --mirror x-axis ctrl + alt - m : yabai -m window --toggle zoom-fullscreen ctrl + alt - t : yabai -m window --toggle float :: choose ctrl + alt - a ; choose choose < p : skhd -k 'escape'; ${choose-pass}/bin/choose-pass choose < escape ; default play : ${pkgs.mpc_cli}/bin/mpc toggle ''; }; services.spacebar = { enable = true; package = pkgs.spacebar; config = { position = "top"; height = 28; spacing_left = 25; spacing_right = 25; text_font = ''"Inter:Regular:12.0"''; icon_font = ''"Font Awesome 5 Free:Solid:12.0"''; background_color = "0xff282828"; foreground_color = "0xffebdbb2"; space_icon_color = "0xff83a598"; space_icon = "•"; space_icon_strip = "1 2 3 4 5 6 7 8 9 10"; power_icon_strip = " "; clock_icon = ""; clock_format = ''"%d/%m/%y %R"''; }; }; home-manager.users.rilla = import ./home/echidna.nix; system.stateVersion = 4; }