From 19e2f737bc3583252eef50b2f3f6ccadbf51adde Mon Sep 17 00:00:00 2001 From: MDietermann Date: Wed, 12 Aug 2026 15:57:10 +0200 Subject: [PATCH] Fix stale documentation in CLAUDE.md - Remove deleted fonts.nix from directory layout - Update 'Adding a New Program' section to reflect ponytail cleanup: simple packages go in common.nix, per-file only for programs needing real configuration - Update Rules section to document common.nix and per-file program patterns --- CLAUDE.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 57610b2..bd1340f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,8 +9,7 @@ hosts/ nikita-nixos/ # nikita's machine home/ packages-base.nix # universal packages every host gets (neovim, ripgrep, etc.) - programs/ # one file per installable program - fonts.nix # font config + programs/ # installable programs (common.nix for simple packages, per-file for configured programs) rofi.nix # rofi config + packages symlinks.nix # home-manager symlinks tmux.nix # tmux config @@ -21,26 +20,29 @@ system/ # NixOS system-level modules ## Adding a New Program -1. Create `home/programs/.nix`: +**For simple packages (no config):** Add the package to `home/programs/common.nix`'s `home.packages` list. + +**For programs that need configuration** (session variables, extra options, dependencies): Create `home/programs/.nix`: ```nix { pkgs, ... }: { - home.packages = [ pkgs. ]; + # configuration + packages } ``` -The filename is the program name; the package attribute can differ (e.g. `godot.nix` uses `pkgs.godot_4`). - -2. Add the import to whichever hosts should have it in `hosts//home.nix`: +Then add the import to `hosts//home.nix`: ```nix ../../home/programs/.nix ``` +Example: `rustup.nix` needs config (session variables) so it gets its own file. Simple packages like `lazygit` go in `common.nix`. + ## Rules - `home/packages-base.nix` — shared baseline, imported by every host. Only add truly universal tools here (shell utilities, editors). -- `home/programs/` — one file per program. Hosts opt in by importing. +- `home/programs/common.nix` — simple packages that just need to be installed (no extra config). +- `home/programs/.nix` — programs that need real configuration beyond just `home.packages`. Hosts opt in by importing. - `home/.nix` (tmux, zsh, rofi, etc.) — for programs that need configuration beyond just installing a package. Same opt-in pattern via host imports. - `system/` modules are NixOS system-level config (not home-manager). Add them to `hosts//default.nix`.