Skip to content

jp-mbp - MacBook Pro M4

Platform nix-darwin aarch64
CPU Apple M4
User nikhil.singh
State version 6

Modules Imported

imports = [
  flake.darwinModules.default    # base: settings, brew, stylix, sharedModules
  flake.darwinModules.yabai      # window manager + skhd
  flake.inputs.sops-nix.darwinModules.sops
];

The darwin default module wires: nix settings, system settings, Homebrew, stylix, and shared home-manager modules (default, packages, terminal, mpv, zathura, browser).

Window Management

Two tiling window managers are available:

  • Yabai + skhd-zig (active) - BSP layout, scripting additions, hyper key bindings
  • AeroSpace (home-manager) - alternative tiling WM with cmd-alt bindings (capslock mapped to cmd-alt via Karabiner)
  • Janky Borders - window focus borders

Input

  • Karabiner-Elements - keyboard remapping (quick_hyper complex modification, capslock โ†’ hyper)
  • Hammerspoon - automation: VimMode (system-wide jk enter), Hammerspoon Mode, SKHD special mode indicator, password/Firenvim/Homerow guards

Packages

Managed via Homebrew (nix-darwin homebrew.casks + mas):

betterdisplay, homerow, hiddenbar, hyperkey, shottr, maccy, imageoptim, localsend, steam, utm, whisky, tailscale (mas), amphetamine (mas), and more.

Theming

  • Stylix - kanagawa-dragon theme, Monaspace fonts, shared across platforms
  • CLI-only theme is not used on jp-mbp (it's a desktop machine)

Remote Builders

jp-mbp delegates nix builds to dsd and semi over SSH:

nix.distributedBuilds = true;
nix.buildMachines = [
  { inherit (cfg.builders.dsd) hostName system maxJobs speedFactor supportedFeatures sshUser;
    sshKey = config.sops.secrets."private-keys/nix-builder".path; }
  { inherit (cfg.builders.semi) hostName system maxJobs speedFactor supportedFeatures sshUser;
    sshKey = config.sops.secrets."private-keys/nix-builder".path; }
];

The builder SSH key comes from sops (secrets/office.yaml โ†’ private-keys/nix-builder).

macOS Defaults

System settings via darwin settings module:

  • Dark mode, fast key repeat, caps lock โ†’ escape
  • Touch ID for sudo (PAM)
  • Dock: autohide, static-only, no recents, magnification
  • Finder: show extensions, no desktop icons, path bar
  • Spaces spans-displays = false (for AeroSpace)

Secrets

Uses secrets/office.yaml (office age key):

  • private-keys/nix-builder (SSH key for remote builds)
  • private-keys/nix_access_token

Files

  • hosts/darwin/jp-mbp/default.nix - main config
  • modules/darwin/ - Darwin system modules
  • modules/home/darwin/ - Darwin home-manager modules