Migrate dotfiles to Nix Flakes + home-manager + nix-darwin - #3
Draft
thiskevinwang with Copilot wants to merge 3 commits into
Draft
thiskevinwang with Copilot wants to merge 3 commits into
thiskevinwang with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: thiskevinwang <26389321+thiskevinwang@users.noreply.github.com>
Co-authored-by: thiskevinwang <26389321+thiskevinwang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate Homebrew-based macOS dotfiles to NixOS with home-manager
Migrate dotfiles to Nix Flakes + home-manager + nix-darwin
Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Homebrew/bash-script setup (
Brewfile,install.sh) is mac-only, imperative, and hard to keep reproducible across machines. This introduces a Nix Flakes-based setup as the primary path, portable across macOS (nix-darwin) and Linux (NixOS/standalone home-manager), while leaving the legacy setup in place as fallback.Flake entry point
flake.nix: inputs (nixpkgs, nixpkgs-unstable, home-manager, nix-darwin) and outputs fordarwinConfigurations.macbook,nixosConfigurations.linux-desktop, and standalonehomeConfigurations."kevin@linux|darwin".home-manager modules (shared across platforms)
home/shells.nix— zsh, oh-my-zsh, zsh-completions, pure prompthome/editors.nix— vim/neovim, VSCode extensions, zed settings + AGENTS.mdhome/terminal.nix— tmux (+ tmux-powerline), ghosttyhome/programs.nix— CLI tools ported fromBrewfilehome/default.nix— wires the above together, setshome.stateVersionSystem-level configs
nix/darwin.nix— Caps Lock → Control remap, TouchID sudo, unfree packages allowednix/linux.nix— minimal machine-agnostic NixOS base (placeholders for fileSystems/bootloader, meant to be overridden per host)Docs
README.mdupdated with Nix quickstart (macOS/Linux/standalone), repo layout, and machine-customization notes; existing Homebrew/bash flow kept as a documented "Legacy Homebrew setup" fallback.Example — applying on a Mac:
Validated end-to-end with
nix flake check(no localnixbinary in this environment, so run via anixos/nixDocker container); this surfaced and required fixing several real issues:programs.vscode.profilesdoesn't exist in the pinned home-manager release,pkgs.tmuxPlugins.tpmdoesn't exist (switched totmuxPlugins.tmux-powerline),webprenamed tolibwebp, VSCode requiringnixpkgs.config.allowUnfree, and NixOS requiringfileSystems/bootloader assertions to satisfy evaluation.