nixcfg/CLAUDE.md
2026-04-20 10:06:26 +02:00

67 lines
2.6 KiB
Markdown

## Project Analysis Summary
This is a comprehensive NixOS/Nix-Darwin configuration repository that follows a structured, modular approach to
managing system configurations. Here's an overview:
### Project Structure and Purpose
This repository is a Nix Flake-based configuration setup for managing multiple systems across different architectures:
- **NixOS systems** (x86_64-linux, aarch64-linux)
- **macOS systems** (x86_64-darwin, aarch64-darwin)
- **Home Manager configurations** for user environments
### Key Components
1. **Flake Configuration**
- Uses Snowfall library for flake structure
- Integrates multiple inputs including:
- NixOS and Nixpkgs (stable and unstable)
- Nix-Darwin for macOS
- Home Manager for user environments
- Various specialized tools (lanzaboote, sops-nix, disko, etc.)
2. **Modular Structure**
- `modules/`: Reusable configuration modules (NixOS, Darwin, Home-Manager)
- `systems/`: System-specific configurations organized by architecture
- `homes/`: User-specific Home Manager configurations
- `lib/`: Helper functions and utilities
- `overlays/`: Nixpkgs modifications
- `packages/`: Custom package definitions
3. **Notable Features**
- Supports secure boot via Lanzaboote
- Includes specialized SGX (Software Guard Extensions) configurations
- Uses SOPS for secrets management
- Implements disk configuration via Disko
- Provides NixOS mailserver configuration
- Includes Neovim configuration via flake
- Homebrew integration for macOS
- CLAUDE.md with development guidelines
### Development Practices
Based on the CLAUDE.md file being added, the project follows these practices:
- Standardized build and configuration commands
- Consistent module structure with `mkEnableOption` and `mkIf` patterns
- Namespace convention using `metacfg`
- Organized file/directory naming (kebab-case for files, camelCase for options)
- Documented code and conventional commit format
### Linting and Formatting
- Run `nix run nixpkgs#statix check` to lint Nix code (analogous to `cargo clippy` in Rust projects).
- Run `nix fmt` to format Nix code (analogous to `cargo fmt` in Rust projects).
### Usage
The project provides commands for:
- Installing systems via nixos-anywhere
- Updating NixOS and macOS systems
- Managing Home Manager configurations
- All using the flake as the central configuration source
This appears to be a well-organized, comprehensive Nix configuration setup for managing multiple systems across
different architectures with a focus on modularity, reusability, and maintainability.