Unified Nix-based configuration for macOS (nix-darwin) and NixOS.
dotfiles/
├── flake.nix # Unified flake (NixOS + nix-darwin)
├── Makefile # Build and setup targets
├── hosts/
│ ├── nixos/ # NixOS system configuration
│ └── macos/ # nix-darwin system configuration
├── home/
│ ├── nixos.nix # NixOS Home Manager entry point
│ ├── macos.nix # macOS Home Manager entry point
│ └── modules/ # Shared and platform-specific modules
├── brew/ # Homebrew Brewfiles (macOS)
└── secrets/ # sops-nix encrypted secrets
- Install Nix
- Clone this repository to
~/dotfiles - Apply the nix-darwin configuration:
make macos-switch - Install Homebrew packages:
make macos-brew make macos-brew-gui
- Clone this repository to
~/dotfiles - Apply the NixOS configuration:
make nixos-switch
| Target | Description |
|---|---|
macos-build |
Build nix-darwin configuration (dry run) |
macos-switch |
Apply nix-darwin + Home Manager configuration |
macos-brew-install |
Install Homebrew |
macos-brew |
Install base Homebrew packages |
macos-brew-gui |
Install GUI Homebrew packages |
macos-brew-optional |
Install optional Homebrew packages |
macos-brew-himkt |
Install personal Homebrew packages |
macos-update |
Update flake inputs |
macos-clean |
Delete old macOS generations (keep last 7) |
macos-gc |
Run Nix garbage collection |
nixos-build |
Build NixOS configuration (dry run) |
nixos-switch |
Apply NixOS + Home Manager configuration |
nixos-update |
Update flake inputs |
nixos-clean |
Delete old NixOS generations (keep last 7) |
nixos-gc |
Run Nix garbage collection |