Skip to content

Commit fe45283

Browse files
committed
docs: rewrite README for the Nix flake / nix-darwin / home-manager setup
The old README still described the pre-migration install.sh flow and claimed Ubuntu support; setup.sh has been macOS-only since the Nix migration. Document the actual setup flow, what's managed, and repo structure instead.
1 parent 4d6697f commit fe45283

1 file changed

Lines changed: 46 additions & 5 deletions

File tree

README.md

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,53 @@
11
# dotfiles
22

3-
## Support OS
3+
[![lint](https://github.com/corrupt952/dotfiles/actions/workflows/lint.yaml/badge.svg)](https://github.com/corrupt952/dotfiles/actions/workflows/lint.yaml)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
45

5-
- MacOS
6-
- Ubuntu
6+
Personal macOS workstation configuration, declared as a Nix flake and applied with [nix-darwin](https://github.com/nix-darwin/nix-darwin) + [home-manager](https://github.com/nix-community/home-manager).
77

8-
## Install
8+
## Requirements
9+
10+
- macOS (this configuration only supports `aarch64-darwin`)
11+
- [1Password for Mac](https://1password.com/downloads/mac/), with **Settings > Developer > Integrate with 1Password CLI** enabled
12+
13+
Everything else, including Nix itself, is installed by `setup.sh`.
14+
15+
## Setup
916

1017
```sh
11-
./install.sh
18+
./setup.sh [username]
19+
```
20+
21+
`username` defaults to the current macOS user. The script:
22+
23+
1. Verifies 1Password for Mac is installed
24+
2. Writes machine-local identity files under `machine-local/` (gitignored)
25+
3. Installs Nix via [Lix](https://lix.systems/) if it isn't already present
26+
4. Runs `darwin-rebuild switch` against this flake
27+
28+
Re-run `./setup.sh` any time to reapply the configuration after editing it.
29+
30+
## What's managed
31+
32+
- **macOS defaults** (`darwin.nix`) — Dock, Finder, trackpad, menu bar clock, Touch ID for `sudo`, scheduled Nix GC/store optimisation
33+
- **Shell & tools** (`modules/`) — zsh, tmux, WezTerm, git (aliases, delta, per-workspace identities), fzf/ripgrep/direnv, Ruby, opencode, and Claude Code settings/hooks
34+
- **Workspace identities** (`modules/workspaces`) — per-directory Git identity and [sallyport](https://github.com/corrupt952/sallyport)-managed environment variables, driven by `machine-local/identities.nix`
35+
- A few of my own tools, pulled in as flake inputs: [xckit](https://github.com/corrupt952/xckit), [closest](https://github.com/corrupt952/closest), [tmuxist](https://github.com/corrupt952/tmuxist), [sallyport](https://github.com/corrupt952/sallyport)
36+
37+
## Structure
38+
39+
```
40+
flake.nix # inputs (nixpkgs, nix-darwin, home-manager, ...) and outputs
41+
darwin.nix # system-level (nix-darwin) configuration
42+
home-manager.nix # top-level home-manager configuration
43+
modules/ # one directory per home-manager module
44+
machine-local/ # gitignored; machine-specific identity, created by setup.sh
1245
```
46+
47+
## CI
48+
49+
Pushes are linted with [shellcheck](https://www.shellcheck.net/), [actionlint](https://github.com/rhysd/actionlint), [zizmor](https://zizmor.sh/), and [statix](https://github.com/oppiliappan/statix) — see `.github/workflows/lint.yaml`.
50+
51+
## License
52+
53+
[MIT](./LICENSE)

0 commit comments

Comments
 (0)