# 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/.nix`: ```nix { pkgs, ... }: { home.packages = [ pkgs. ]; } ``` 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`: ```nix ../../home/programs/.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/.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`.