2024-11-09 14:02:26 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
2024-11-03 10:25:39 +00:00
|
|
|
programs.fish.enable = true;
|
2024-11-03 10:31:10 +00:00
|
|
|
home-manager.users.root.imports = [
|
2024-11-03 10:25:39 +00:00
|
|
|
./home-manager.nix
|
|
|
|
];
|
2024-11-05 08:11:22 +00:00
|
|
|
home-manager.users.darkkirb.imports = [
|
|
|
|
./home-manager.nix
|
|
|
|
];
|
2024-11-03 10:31:10 +00:00
|
|
|
programs.bash.interactiveShellInit = ''
|
2024-11-05 08:11:22 +00:00
|
|
|
for user in root darkkirb; do
|
2024-11-03 10:31:10 +00:00
|
|
|
if [[ $USER == $user ]]; then
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
'';
|
2024-11-03 10:25:39 +00:00
|
|
|
}
|