aboutsummaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-03-31 12:31:08 +0200
committerNatasha Moongrave <natasha@256phi.eu>2026-03-31 12:31:08 +0200
commita9d265475915636393b89edca99ddf2ba3fde2eb (patch)
tree54d0c8bc0ca13d81de9ad0dcd8942ee86afcd78b /CLAUDE.md
parent59be3fbd673d64c12a1a831081b40f4ae888c939 (diff)
Fixed up documentation
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md74
1 files changed, 37 insertions, 37 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 10ef3ce..0153194 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -4,15 +4,15 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Project Overview
-This is a NixOS declarative system configuration repository using Nix flakes to manage multiple machines (kronos laptop, herra desktop) with modular, composable configurations. It uses NixOS 25.11 and Home Manager 25.11.
+NixOS flake configuration for multiple machines (kronos laptop, herra desktop) using NixOS 25.11 and Home Manager 25.11. Features a layered architecture with swappable desktop rices.
## Common Commands
```bash
-# Apply configuration changes
+# Apply configuration
sudo nixos-rebuild switch
-# Test configuration without applying
+# Test without applying
sudo nixos-rebuild test
# Validate flake syntax
@@ -24,51 +24,51 @@ sudo nixos-rebuild dry-run
## Architecture
-The configuration uses a **layered orchestrator pattern** where `default.nix` files act as local aggregators that import related modules:
-
```
-flake.nix # Entry point, defines inputs
+flake.nix # Entry point
+ ↓
+hosts/{kronos,herra}/ # Per-machine (hostname + hardware)
+ ↓
+system/ # System-wide config
+ ├─ boot, audio, bluetooth, networking, graphics
+ ├─ packages, programs, services, users, nix
+ ├─ desktop.nix # X11 + i3wm
+ └─ stylix.nix # Theming
+ ↓
+home/mun/ # User config
+ ├─ programs/ # git, ssh, zsh
+ └─ (imports active rice)
-hosts/{kronos,herra}/ # Per-machine configs
- └─ configuration.nix # System orchestrator
- ├─ modules/nixos/base/ # Base system (applied to all machines)
- └─ modules/nixos/des/ # Desktop environment (i3wm or gnome)
-
-mun.nix # Home-manager orchestrator for user "mun"
- └─ modules/home/i3wm/ # User-level app configs
- └─ nord-blue/ # Current i3wm "rice" (theme/config)
+home/rices/{nord-blue,original}/ # Desktop themes
```
-### Four Configuration Layers
+## Key Files
-1. **System-Wide Base** (`modules/nixos/base/`): Boot, networking, users, services, packages - applied to all machines
-2. **Environment-Specific System** (`modules/nixos/des/`): Desktop environment choice (i3wm vs gnome)
-3. **Home-Manager User Config** (`mun.nix`): User-specific settings, shell, SSH, packages
-4. **Environment-Specific Home** (`modules/home/i3wm/nord-blue/`): UI configs, keybindings, theming
-
-### Key Files
-
-- `flake.nix` - Defines nixpkgs and home-manager inputs
-- `hosts/kronos/configuration.nix` - Laptop system config
-- `hosts/herra/configuration.nix` - Desktop system config (dual-boot with Windows)
-- `mun.nix` - Home-manager entry point for user "mun"
-- `modules/nixos/base/packages.nix` - System-wide packages
-- `modules/home/i3wm/nord-blue/variables.nix` - Color scheme and theme variables
+- `flake.nix` - Defines inputs (nixpkgs, home-manager, stylix, fenix)
+- `hosts/kronos/configuration.nix` - Laptop config
+- `hosts/herra/configuration.nix` - Desktop config (dual-boot)
+- `system/default.nix` - System module orchestrator
+- `system/packages.nix` - System-wide packages
+- `home/mun/default.nix` - User orchestrator (imports active rice)
+- `home/rices/nord-blue/variables.nix` - Active rice colors
## Adding Configurations
-**New system package:** Add to `modules/nixos/base/packages.nix`
+**New system package:** Add to `system/packages.nix`
-**New base system module:** Create file in `modules/nixos/base/`, add import to `modules/nixos/base/default.nix`
+**New system module:** Create in `system/`, add to `system/default.nix` imports
-**New home-manager module:** Create file in the active rice directory (e.g., `modules/home/i3wm/nord-blue/`), add import to its `default.nix`
+**New user program:** Create in `home/mun/programs/`, add to `home/mun/default.nix` imports
-**New i3wm rice:** Create new directory under `modules/home/i3wm/` with its own `default.nix` orchestrator
+**New rice module:** Create in active rice directory, add to its `default.nix`
-## Environment Switching
+**New rice:** Create `home/rices/my-rice/` with `default.nix` and `variables.nix`
-To switch desktop environments, edit both:
-1. `hosts/{machine}/configuration.nix` - Change import in `modules/nixos/des/`
-2. `mun.nix` - Change import in `modules/home/`
+## Switching Rices
+
+Edit `home/mun/default.nix` to change the rice import:
+```nix
+../rices/nord-blue # or ../rices/original
+```
-Then run `sudo nixos-rebuild switch`.
+Then: `sudo nixos-rebuild switch`