feat: switch to fish as an interactive shell
All checks were successful
/ check (push) Successful in 8s
/ check-renovaterc (push) Successful in 4s
/ build-packages (push) Successful in 14s
/ build-vm (push) Successful in 2s
/ report-size (push) Successful in 4s

Now that it is written in Rust I am interested!
This commit is contained in:
Jalil David Salamé Messina 2025-03-23 21:44:28 +01:00
parent 6bf3851d5a
commit cd4fb19335
Signed by: jalil
GPG key ID: F016B9E770737A0B
6 changed files with 117 additions and 139 deletions

View file

@ -35,6 +35,17 @@ in
];
programs = {
# Launch fish if shell is interactive (from https://wiki.nixos.org/wiki/Fish)
bash.interactiveShellInit = # bash
''
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
'';
# Default shell
fish.enable = true;
# Shell prompt
starship = {
enable = true;
@ -58,8 +69,6 @@ in
(import ./starship-shorter-text.nix)
];
};
# Default shell
zsh.enable = true;
};
environment.etc = keysFromGithub;
@ -74,7 +83,6 @@ in
builtins.attrNames keysFromGithub
);
};
users.defaultUserShell = pkgs.zsh;
# Open ports for spotifyd
networking.firewall = {
allowedUDPPorts = [ 5353 ];