3b5c031619
- Introduced a new module `rbw-ssh-socket.nix` to manage SSH_AUTH_SOCK for rbw. - Updated `default.nix` to utilize the new SSH socket variable for session management. - Refactored Bash and Fish shell configurations to use the new module for setting SSH_AUTH_SOCK, improving maintainability and consistency across shell environments.
46 lines
1.2 KiB
Nix
46 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.";
|
|
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
}
|