Fold dotfiles-nixos into this repository #1

Merged
alexion merged 32 commits from nixos-migration into main 2026-07-19 09:30:46 -04:00
5 changed files with 9 additions and 7 deletions
Showing only changes of commit 5a89d4addb - Show all commits

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.

View File

@@ -0,0 +1,3 @@
# Tune the done plugin: only notify for commands past 10s, at low urgency.
set -g __done_min_cmd_duration 10000
set -g __done_notification_urgency_level low

View File

@@ -8,10 +8,6 @@ set -gx VISUAL nvim
set -x MANROFFOPT "-c"
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
# Tune the done plugin: only notify for commands past 10s, at low urgency.
set -g __done_min_cmd_duration 10000
set -g __done_notification_urgency_level low
# Prepend ~/.local/bin to PATH when it exists.
if test -d ~/.local/bin
fish_add_path ~/.local/bin

View File

@@ -37,6 +37,9 @@ in
wget # non-interactive HTTP downloader; backs the wget abbreviation
];
# done's tuning lives in its own conf.d snippet, mirroring ~/.config/fish.
xdg.configFile."fish/conf.d/done.fish".source = ./conf.d/done.fish;
programs.fish = {
enable = true;
@@ -111,11 +114,11 @@ in
copy = {
description = "Copy a file, or recursively copy a source directory into a destination";
body = builtins.readFile ./fish/copy.fish;
body = builtins.readFile ./functions/copy.fish;
};
};
interactiveShellInit = builtins.readFile ./fish/interactive-init.fish;
interactiveShellInit = builtins.readFile ./config.fish;
};
};
};