set fish as default login shell via workaround
This commit is contained in:
parent
cfc893048a
commit
e1a2780a0a
2 changed files with 18 additions and 2 deletions
|
|
@ -34,7 +34,6 @@
|
|||
];
|
||||
home = "/home/srv";
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "fish";
|
||||
in
|
||||
|
|
@ -22,6 +27,18 @@ in
|
|||
vim = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue