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.
47 lines
1.6 KiB
Markdown
47 lines
1.6 KiB
Markdown
# 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`.
|