Skip to content

mfyuu/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

macOS dotfiles managed with Nix flakes, nix-darwin, and home-manager.

Initial Setup

  1. Install Xcode Command Line Tools and Homebrew (if not already installed):

    xcode-select --install
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install Determinate Nix (if not already installed) 1:

    curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
  3. Clone this repository:

    git clone https://github.com/mfyuu/dotfiles.git ~/.dotfiles
  4. Apply the nix-darwin configuration 2 3:

    # Replace <hostname> with your machine name (M4Pro, M4Air, etc.)
    sudo nix run nix-darwin -- switch --flake ~/.dotfiles#<hostname>
  5. Reload your shell:

    exec zsh

Daily Usage

Run these commands from the dotfiles directory (~/.dotfiles):

# Update flake.lock (fetch latest nixpkgs, nix-darwin, home-manager)
nix run .#update

# Build and apply configuration (Homebrew is also updated automatically)
nix run .#switch

# Dry run (build without applying)
nix run .#build

Note

If running from outside the dotfiles directory, replace . with the path to the repository (e.g., nix run ~/.dotfiles#update).

Benchmark

Zsh startup time is continuously tracked in CI. Every push to main runs 50 iterations with hyperfine and records the results.

https://bench.mfyuu.dev

Note

These numbers are from GitHub Actions runners and may not reflect local performance. Use the trend to catch regressions, not as absolute measurements.

Footnotes

  1. The first run may fail. If it does, just run the same command again and it should succeed. ↩

  2. This sets LocalHostName and ComputerName via scutil, so it works as the initial hostname setup even if the machine has no custom hostname configured yet. ↩

  3. If Homebrew is not installed, the command will fail with an installation prompt. Install Homebrew first (see step 1), then re-run this command. ↩

About

🌵

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors