From 5e7008c685709407c6cfba46cf47285530059927 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Mon, 10 Nov 2025 14:38:59 -0500 Subject: [PATCH] Switch to fish shell --- home.nix | 68 ++++++++++++++++++++------------------------ hosts/hephaestus.nix | 2 +- hosts/zelus.nix | 3 ++ 3 files changed, 35 insertions(+), 38 deletions(-) diff --git a/home.nix b/home.nix index 1d025e2..349e8f1 100644 --- a/home.nix +++ b/home.nix @@ -97,7 +97,7 @@ in scrolling.history = 100000; general.live_config_reload = true; terminal.shell = { - program = "bash"; + program = "fish"; }; font = { size = lib.mkForce 14.0; @@ -110,6 +110,7 @@ in starship = { enable = true; + enableFishIntegration = true; settings = { add_newline = false; gcloud = { @@ -121,45 +122,37 @@ in }; }; - bash = { + fish = { enable = true; - # autosuggestion.enable = true; - historySize = 1000000; - initExtra = '' - export PAGER=less - export EDITOR=vim - export DOCKER_CLI_HINTS=false - export TERM=xterm-256color + shellInitLast = '' + # environment variables + set -x PAGER less + set -x EDITOR vim + set -x DOCKER_CLI_HINTS false + set -x TERM xterm-256color + set -x DOCKER_DEFAULT_PLATFORM linux/amd64 + set -x NNN_FIFO "$XDG_RUNTIME_DIR/nnn.fifo" + + # PATH + set -x PATH $PATH ~/.cargo/bin + set -x PATH $PATH ~/.local/bin + set -x PATH $PATH ~/.npm-packages/bin + set -x PATH $PATH /opt/homebrew/bin + set -x PATH $PATH ~/.krew/bin + set -x PATH $PATH ~/bin + + # Go-related environment + set -x GOPATH ~/go + set -x GOBIN $GOPATH/bin + set -x PATH $PATH $GOBIN + + source $HOME/work.fish - export DOCKER_DEFAULT_PLATFORM=linux/amd64 - export NNN_FIFO="$XDG_RUNTIME_DIR/nnn.fifo"; - - export PATH=$PATH:~/.cargo/bin - export PATH=$PATH:~/.local/bin - export PATH=$PATH:~/.npm-packages/bin - export PATH=$PATH:/opt/homebrew/bin - export PATH=$PATH:~/.krew/bin - export PATH=$PATH:~/bin - export GOPATH=~/go - export GOBIN=$GOPATH/bin - export PATH=$PATH:$GOBIN - - source $HOME/.bash-work - - if [[ "$OSTYPE" == "darwin"* ]]; - then - export PATH="$(brew --prefix)/opt/gnu-tar/libexec/gnubin:$PATH" - fi - - source <(helm completion bash) - source <(kubectl completion bash) - eval "$(atuin init bash)" - - # kubecolor - source <(kubectl completion bash) - alias kubectl=kubecolor - ''; + atuin init fish | source + helm completion fish | source + kubectl completion fish | source + # ''; shellAliases = { ".." = "cd .."; @@ -172,6 +165,7 @@ in grep = "rg --smart-case"; j = "just"; k = "kubecolor"; + kubectl = "kubecolor"; kp = "viddy 'kubectl get pods'"; kcx = "kubectx"; kns = "kubens"; diff --git a/hosts/hephaestus.nix b/hosts/hephaestus.nix index 8811f90..7f8f4e9 100644 --- a/hosts/hephaestus.nix +++ b/hosts/hephaestus.nix @@ -271,7 +271,7 @@ "libvirtd" "corectrl" ]; - shell = pkgs.bash; + shell = pkgs.fish; }; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/hosts/zelus.nix b/hosts/zelus.nix index c8afb4e..f4536c5 100644 --- a/hosts/zelus.nix +++ b/hosts/zelus.nix @@ -15,6 +15,9 @@ system.stateVersion = 4; users.users."dave.gallant".home = "/Users/dave.gallant"; + users.users."dave.gallant".shell = pkgs.fish; + + programs.fish.enable = true; system.primaryUser = "dave.gallant";