Declarative macOS system configuration using nix-darwin and home-manager.
This flake manages:
- System packages via nixpkgs and Homebrew
- GUI applications via Homebrew Casks
- Mac App Store apps via
mas - macOS system preferences (Dock, Finder, keyboard, etc.)
- User environment (shell, Git, VS Code, GPG, etc.)
- macOS on Apple Silicon (aarch64-darwin)
- Nix package manager with flakes enabled
The recommended way to install Nix on macOS is using the Determinate Systems Nix Installer:
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --prefer-upstream-nixThis installer:
- Enables flakes and the unified CLI by default
- Stores a receipt for easy uninstallation
- Works seamlessly with nix-darwin
Update flake inputs and apply the configuration:
nix flake update --flake ~/.config/nix
sudo darwin-rebuild switch --flake ~/.config/nix#macos~/.config/nix/
├── flake.nix # Flake definition and inputs
├── darwinConfigurations/
│ └── macos.nix # System-level configuration
└── homeConfigurations/
└── shivangswain.nix # User-level configurationThis project is licensed under the MIT License. See LICENSE for details.