feat: switch to fish as an interactive shell
Now that it is written in Rust I am interested!
This commit is contained in:
parent
6bf3851d5a
commit
cd4fb19335
6 changed files with 117 additions and 139 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue