commit 3c01f49a1e3a7c7757e54d1e962b59fc2b35714e
parent 4ed9e97576b32fbe715c0d6c488cb878b227f6ac
Author: Katja (ctucx) <git@ctu.cx>
Date: Thu, 27 Mar 2025 16:25:25 +0100
parent 4ed9e97576b32fbe715c0d6c488cb878b227f6ac
Author: Katja (ctucx) <git@ctu.cx>
Date: Thu, 27 Mar 2025 16:25:25 +0100
configurations/home-manager/programs: add `fish`
7 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/configurations/homeManager/programs/bitwarden-cli.nix b/configurations/homeManager/programs/bitwarden-cli.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, ... }: { @@ -8,7 +8,6 @@ shellExtraInit = '' bw-unlock () { if [[ -z $BW_SESSION ]] ; then - >&2 echo 'bw locked - unlocking into a new session' export BW_SESSION="$(bw unlock --raw)" fi } @@ -16,6 +15,11 @@ in { zsh.initExtra = shellExtraInit; bash.initExtra = shellExtraInit; + fish.functions.bw-unlock = '' + if set -g BW_SESSION + set -gx BW_SESSION "$(bw unlock --raw)" + end + ''; }; }
diff --git a/configurations/homeManager/programs/fish.nix b/configurations/homeManager/programs/fish.nix @@ -0,0 +1,15 @@ + +{ pkgs, lib, ... }: + +{ + + programs.fish = { + enable = true; + generateCompletions = true; + + shellInitLast = lib.mkIf pkgs.stdenv.isDarwin '' + eval "$(/opt/homebrew/bin/brew shellenv)" + ''; + }; + +}
diff --git a/configurations/homeManager/programs/ghostty.nix b/configurations/homeManager/programs/ghostty.nix @@ -4,6 +4,7 @@ programs.ghostty = { enable = true; + enableFishIntegration = true; enableZshIntegration = true; enableBashIntegration = true; installBatSyntax = true; @@ -14,4 +15,4 @@ }; }; -}- \ No newline at end of file +}
diff --git a/configurations/homeManager/programs/gpg.nix b/configurations/homeManager/programs/gpg.nix @@ -47,6 +47,10 @@ bash.initExtra = shellExtraInit; zsh.initExtra = shellExtraInit; + fish.interactiveShellInit = '' + gpgconf --launch gpg-agent + set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) + ''; gpg = { enable = true;
diff --git a/configurations/homeManager/programs/mcfly.nix b/configurations/homeManager/programs/mcfly.nix @@ -4,6 +4,7 @@ programs.mcfly = { enable = true; + enableFishIntegration = true; enableBashIntegration = true; enableZshIntegration = true; fuzzySearchFactor = 2;
diff --git a/configurations/homeManager/programs/starship.nix b/configurations/homeManager/programs/starship.nix @@ -4,6 +4,7 @@ programs.starship = { enable = true; + enableFishIntegration = true; enableZshIntegration = true; enableBashIntegration = true;
diff --git a/configurations/homeManager/programs/zoxide.nix b/configurations/homeManager/programs/zoxide.nix @@ -4,6 +4,7 @@ programs.zoxide = { enable = true; + enableFishIntegration = true; enableZshIntegration = true; enableBashIntegration = true; };