My personal dotfiles managed with Nix Flakes.
.
|-- config # Actual configuration files
│ ├── zsh # Zsh configuration
│ ├── git # Git configuration
│ ├── vim # Vim configuration
│ └── ...
|── hosts # Host-specific configurations
│ ├── aarch64-darwin # Apple Silicon Mac settings
│ ├── x86_64-darwin # Intel Mac settings
│ ├── x86_64-linux # Linux settings
|── modules # Common modules
│ ├── nix-darwin # nix-darwin common settings
│ ├── home-manager # home-manager common settings
|--flake.nix # Nix Flake configuration
Before diving into Nix, you'll need to prepare your system.
- Run the Pre-installation Script:
- Execute the
pre-install.shscript located in the root of this repository. - This script handles essential setup like XDG Base Directory configuration, Homebrew installation (on macOS), and Zinit installation.
./pre-install.sh
- Execute the
- Install Determinate Nix:
- It's recommended to install Determinate Nix on macOS.
- Determinate Nix provides a robust and reliable installation of Nix, ensuring better compatibility and a smoother experience when managing your dotfiles with Nix flakes on your Mac.
For Intel Mac:
sudo nix run github:LnL7/nix-darwin -- switch --flake .#intel-macFor Apple Silicon Mac:
sudo nix run github:LnL7/nix-darwin -- switch --flake .#arm-macnix run --experimental-features 'nix-command flakes' .#home-manager -- switch --flake .#linuxnix flake update