Files
chiasson-nix/modules/wisdom/shells/fish.nix
T
Olivier 13f35677be refactor(wisdom): decentralize module defaults and update conventions
Move Home Manager module defaults from a centralized `desktop-home-defaults.nix`
file into their respective `wisdom` slices. This change aligns with the
updated documentation regarding module ownership, where defaults live
with the option that owns them rather than in a shared defaults file.

Additionally, update `docs/conventions.md` to reflect this new pattern for
defining `mkEnableOption` defaults and move base git/encryption
configurations into the core `wisdom` module.

- Delete `modules/hosts/desktop-home-defaults.nix`
- Update `modules/wisdom/default.nix` to include shared git and package defaults
- Add `default = ...` to `mkEnableOption` in various `wisdom` modules
- Update `docs/conventions.md` with new HM slice guidelines
2026-07-16 13:51:48 -03:00

48 lines
1.2 KiB
Nix

{ self, ... }: {
flake.homeManagerModules.wisdomShellFish =
{ config, lib, pkgs, ... }:
let
root = config.chiasson.home;
cfg = config.chiasson.home.shell.fish;
rbw = self.lib.rbwSshSocket;
in
{
options.chiasson.home.shell.fish = {
enable = lib.mkEnableOption "Fish + grc, quiet greeting, rbw SSH socket defaults." // {
default = true;
};
nixYourShell = {
enable = lib.mkEnableOption ''
Wrap `nix` / `nix-shell` so ephemeral shells use fish (and keep oh-my-posh) instead of bash.
'' // {
default = true;
};
};
};
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ pkgs.grc ];
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting ""
${rbw.fishSnippet pkgs}
'';
plugins = [
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
];
};
programs.nix-your-shell = lib.mkIf cfg.nixYourShell.enable {
enable = true;
enableFishIntegration = true;
};
};
};
}