Merge remote; add nix auto-GC and CLAUDE.md
Resolves conflict with upstream tmux/blender additions (already covered by the per-program restructure). Adds weekly nix GC (--delete-older-than 7d), store auto-optimise, and project CLAUDE.md.
This commit is contained in:
46
CLAUDE.md
Normal file
46
CLAUDE.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# NixOS Dotfiles
|
||||
|
||||
## Directory Layout
|
||||
|
||||
```
|
||||
flake.nix # entry point, defines hosts
|
||||
hosts/
|
||||
hivebrain/ # marvin's main machine
|
||||
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
|
||||
rofi.nix # rofi config + packages
|
||||
symlinks.nix # home-manager symlinks
|
||||
tmux.nix # tmux config
|
||||
yazi.nix # yazi config
|
||||
zsh.nix # zsh config
|
||||
system/ # NixOS system-level modules
|
||||
```
|
||||
|
||||
## Adding a New Program
|
||||
|
||||
1. Create `home/programs/<name>.nix`:
|
||||
|
||||
```nix
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.<package-name> ];
|
||||
}
|
||||
```
|
||||
|
||||
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/<host>/home.nix`:
|
||||
|
||||
```nix
|
||||
../../home/programs/<name>.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/<tool>.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/<host>/default.nix`.
|
||||
Reference in New Issue
Block a user