Personal macOS configuration using Nix flakes, nix-darwin, and home-manager.
This repository contains my personal system and user configurations, built on top of core.nix for reusable base configurations.
This follows a layered configuration pattern:
- Base layer: core.nix - Reusable tool configurations
- Personal layer:
modules/- Personal overrides and additions - Host layer:
hosts/meduseld/- Machine-specific settings
dotfiles/
├── flake.nix # Flake configuration
├── flake.lock # Locked input versions
├── nixpkgs.nix # nixpkgs configuration
├── modules/
│ ├── nix-darwin/default.nix # Personal system settings
│ └── home-manager/default.nix # Personal user settings
└── hosts/
└── meduseld/ # Host-specific config
├── nix-darwin/default.nix # System config for this host
└── home-manager/default.nix # User config for this host
- Install Nix with flakes enabled
- Install nix-darwin
- Install home-manager
Apply system-level changes:
sudo darwin-rebuild switch --flake .Apply user environment changes:
home-manager switch --flake .Enter a shell with darwin-rebuild and home-manager available:
nix developBase configurations for:
- Git, Neovim, Zsh, Tmux
- Direnv, Starship, GitHub CLI
- System fonts and preferences
- GPG agent setup
Personal customizations:
- Git identity and signing configuration
- Additional packages (yubikey tools, media tools, etc.)
- Environment variables
- Shell customizations (chruby, cargo, rancher desktop)
Machine-specific settings:
- System state version
- Architecture (aarch64-darwin)
- GUI applications (homebrew casks)
- System packages
nix flake updatenix flake update corenix flake checkhome-manager news --flake .Edit hosts/meduseld/nix-darwin/default.nix:
environment.systemPackages = with pkgs; [
neovim
git
your-new-package # Add here
];Edit modules/home-manager/default.nix:
home.packages = with pkgs; [
cmake
your-new-tool # Add here
];Edit modules/nix-darwin/default.nix:
homebrew.casks = [
"ghostty"
"your-app" # Add here
];Based on the modular configuration pattern from Jitsusama's dotfiles.