|
1 | 1 | # dotfiles |
2 | 2 |
|
3 | | -## Support OS |
| 3 | +[](https://github.com/corrupt952/dotfiles/actions/workflows/lint.yaml) |
| 4 | +[](https://opensource.org/licenses/MIT) |
4 | 5 |
|
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). |
7 | 7 |
|
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 |
9 | 16 |
|
10 | 17 | ```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 |
12 | 45 | ``` |
| 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