From 011486787f639f2d2474bbaf5a6ef3d77fb45a43 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 18:56:27 +0100 Subject: Refactor dotfiles to declarative Nix management (nix-darwin + home-manager) (#5) --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a72f952..3ac45ac 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,55 @@ # dotfiles -My Development Setup +My Development Setup, managed with [Nix](https://nixos.org), [nix-darwin](https://github.com/LnL7/nix-darwin), and [home-manager](https://github.com/nix-community/home-manager). ## Quickstart -First, you need to [install Brew](https://brew.sh). After which, you'll need to [get YADM going](https://yadm.io/docs/install). +### 1. Install Nix ```shell -cobraz@something-mac-something ~ % yadm clone git@github.com:cobraz/dotfiles.git -cobraz@something-mac-something ~ % brew bundle -cobraz@something-mac-something ~ % sh bootstrap.sh +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install ``` -The last command will run for a while. It runs all Mac OSX defaults and stuff, so – i'll take some time! +### 2. Clone the repository + +```shell +git clone git@github.com:simenandre/dotfiles.git ~/dotfiles +cd ~/dotfiles +git submodule update --init --recursive +``` + +### 3. Apply the configuration + +On first run, bootstrap nix-darwin: + +```shell +nix run nix-darwin -- switch --flake .#default +``` + +On subsequent runs: + +```shell +darwin-rebuild switch --flake .#default +``` + +## Structure + +``` +flake.nix # Entry point – nix-darwin + home-manager +modules/ + darwin/ + default.nix # System-level configuration (nix settings, core packages) + homebrew.nix # Homebrew packages (taps, brews, casks, Mac App Store) + macos.nix # macOS system defaults (replaces macos/macos script) + home/ + default.nix # home-manager entry point + git.nix # Git configuration (programs.git) + zsh.nix # Zsh configuration files + starship.nix # Starship prompt configuration + tmux.nix # Tmux configuration + ghostty.nix # Ghostty terminal configuration +apps/ + Brewfile # Legacy Brewfile (superseded by modules/darwin/homebrew.nix) +macos/ + macos # Legacy macOS defaults script (superseded by modules/darwin/macos.nix) +``` -- cgit v1.2.3