2.8 KiB
2.8 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
System Overview
This is a NixOS system configuration repository using Nix flakes with home-manager integration. The configuration manages multiple machines:
- xps13: Dell XPS 13 laptop with Hyprland desktop environment
- Titan: Server configuration
- Athena: Server configuration
Architecture
The configuration is organized using a modular structure:
flake.nix: Main flake configuration defining system inputs and outputs for all machinesmodules/: Shared configuration modulesconfiguration-common.nix: Common system settings shared across machinesconfiguration-[machine].nix: Machine-specific system configurationshardware-configuration-[machine].nix: Hardware-specific configurationshome-manager-common.nix: Common home-manager packages and settingshyprland.nix: Hyprland window manager configurationwaybar.nix: Waybar status bar configuration
home-[machine].nix: Machine-specific home-manager configurationshome/: User dotfiles and configuration filessecrets/: SOPS encrypted secrets
Key Technologies
- NixOS: Declarative Linux distribution
- Nix Flakes: Modern Nix package management with lockfile
- Home Manager: Dotfile and user environment management
- SOPS: Secret management with encryption
- Disko: Declarative disk partitioning
- Hyprland: Wayland compositor (xps13 only)
- Neovim: Custom neovim configuration from external git repository
Common Commands
System Management
# Build and switch to new configuration (requires sudo)
sudo nixos-rebuild switch --flake .#[machine-name]
# Build without switching (test configuration)
nixos-rebuild build --flake .#[machine-name]
# Test configuration (temporary, reverts on reboot)
sudo nixos-rebuild test --flake .#[machine-name]
# Check flake for errors
nix flake check
# Update flake inputs
nix flake update
# Show available system generations
nixos-rebuild list-generations
Machine-Specific Examples
# XPS 13 laptop
sudo nixos-rebuild switch --flake .#xps13
# Titan server
sudo nixos-rebuild switch --flake .#Titan
# Athena server
sudo nixos-rebuild switch --flake .#Athena
Development
# Enter development shell with nix tools
nix develop
# Format nix files
nix fmt
Important Notes
- All machines use the username
th3r00t - Neovim configuration is managed externally from
git.th3r00t.net/th3r00t/nvim-config.git - SOPS is used for secret management - encrypted files are in
secrets/ - Hardware configurations are machine-specific and auto-generated
- The flake uses nixos-unstable channel
- Custom overlays are defined in flake.nix for package modifications