This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Nix flake-based configuration for managing macOS systems using nix-darwin and home-manager. The repository contains a complete system configuration that manages both system-level settings and user-level packages with a modular structure.
The configuration is organized into several key areas:
- System configuration (
modules/): Manages macOS system settings, nix-core configuration, apps, and services - Home manager (
home/): Manages user-level packages and configurations, organized by functionality - Terminal environment: Comprehensive terminal setup with shells, emulators, and CLI tools
- Development tools: Editors, programming languages, and development utilities
# Build and switch to new system configuration
just darwin
# Build with debug/verbose output
just darwin-debug
# Update flake inputs
just update
# Format nix files
just fmt
# Clean build artifacts
just clean
# Garbage collection (remove generations older than 7 days)
just gc# Enter development shell
nix develop
# Format files manually
nix fmt
# Check system configuration
nix flake checkflake.nix: Main flake definition with inputs and outputsJustfile: Command runner for common operationsmodules/: System-level configuration moduleshome/: User-level home-manager configuration
nix-core.nix: Core nix configuration and settingssystem.nix: macOS system preferences and defaultsapps.nix: System-level applicationsservices.nix: System serviceshost-users.nix: User configuration
default.nix: Main home-manager entry pointterminal/: Terminal environment (shells, emulators, CLI tools)gui/: GUI applications (currently commented out)
shell/: Shell configurations (zsh, fish, starship)emulators/: Terminal emulators (wezterm, ghostty)programs/: CLI utilities and tools organized by category
- Username: "shaurya" (defined in flake.nix:29)
- Hostname: "asuna" (defined in flake.nix:31, Justfile:4)
- System: "aarch64-darwin" (Apple Silicon Mac)
- Flakes enabled globally with experimental features
- Nix-index for package discovery
- Comprehensive terminal development environment
- Customized macOS defaults and dock configuration
- TouchID sudo authentication enabled
- Development tools: Git, Docker, Node.js, C/C++ toolchain
- Terminal utilities: fzf, eza, bat, btop, zoxide
- Editors: Helix with language configurations
- Shells: Zsh with Oh My Zsh, Fish shell
- This is a declarative configuration - all changes should be made through nix files
- The configuration uses home-manager for user package management
- System changes require
sudoand usedarwin-rebuild switch - The repo includes pre-commit hooks for formatting (alejandra)
- GUI applications are currently disabled in home configuration (line 10 in home/default.nix)
Before deploying, update the hostname variable:
- In
Justfile:4- update the hostname string - In
flake.nix:31- update the hostname string - The system is configured for Apple Silicon Macs (
aarch64-darwin)