Lay the fish Module out like ~/.config/fish

Move the Module to modules/fish/fish.nix and mirror a real fish config
directory beside it: config.fish (interactive init), conf.d/done.fish
(the done plugin tuning, now a real conf.d file), and functions/copy.fish.
completions/ and themes/ are omitted as they have no content and git
cannot track empty directories.
This commit is contained in:
2026-07-18 18:45:06 -04:00
parent f2ec07887a
commit 516245cded
5 changed files with 9 additions and 7 deletions

View File

@@ -39,4 +39,4 @@ Configure the plugins natively through home-manager rather than a fish plugin ma
- **Abbreviation-first.** Every non-eza alias is now a `shellAbbr` (the eza `ls` family stays an alias), `preferAbbrs = true`, and `generateCompletions = true` is pinned rather than left to the upstream default.
- **vi command-line editing.** `interactiveShellInit` sets `fish_key_bindings fish_vi_key_bindings`; the `bang-bang` plugin re-binds `!`/`$` in insert mode via its own `--on-variable fish_key_bindings` handler, so the switch keeps them working.
- **Trimmed aliases.** Navigation capped at four dots (`.....`/`......` dropped); `psmem`, `psmem10`, `dir`, `vdir`, and `please` removed.
- **Non-trivial fish read from files.** The `interactiveShellInit` block and the `copy` function body live in `modules/fish/interactive-init.fish` and `modules/fish/copy.fish`, pulled in with `builtins.readFile`, so the substantial fish is editable as real fish files. The trivial one-liners stay inline. The Auto-loader only collects `.nix`, so the `.fish` files are inert to it, and the rendered config is byte-for-byte identical to the inline version.
- **Module directory mirrors `~/.config/fish/`.** The Module lives at `modules/fish/fish.nix` with its hand-written fish laid out as in a real fish config: `config.fish` (interactive init, read into `interactiveShellInit`), `conf.d/done.fish` (the done plugin's tuning, placed as a real conf.d file via `xdg.configFile`), and `functions/copy.fish` (the non-trivial `copy` body, read into the `functions` option). Trivial one-liner functions stay inline in `fish.nix`. `completions/` and `themes/` are omitted because they have no content and git cannot track empty directories. The Auto-loader only collects `.nix`, so every `.fish` file is inert to it.