launch fish shell automatically on servers

This commit is contained in:
Dennis Schoepf 2025-05-29 18:58:53 +02:00
parent e0d3821128
commit 866847a833
2 changed files with 22 additions and 0 deletions

View file

@ -34,6 +34,17 @@
};
nix.settings.auto-optimise-store = true;
# Launch fish shell
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
# Networking
networking.hostName = "dnsc-server";
networking.hostId = "380f584e";