Files
nixos-dotfiles/CLAUDE.md
MDietermann 19e2f737bc 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
2026-08-12 15:57:10 +02:00

1.9 KiB

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/                      # 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
  yazi.nix                       # yazi config
  zsh.nix                        # zsh config
system/                          # NixOS system-level modules

Adding a New Program

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/<name>.nix:

{ pkgs, ... }:
{
  # configuration + packages
}

Then add the import to hosts/<host>/home.nix:

../../home/programs/<name>.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/common.nix — simple packages that just need to be installed (no extra config).
  • home/programs/<name>.nix — programs that need real configuration beyond just home.packages. 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.