nixos-config/programs/shell/fish/default.nix
Charlotte 🦝 Delenk 756c156b26
All checks were successful
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #23352 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #23351 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #23350 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra nixosConfigurations.not522 Hydra build #23353 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.not522-installer Hydra build #23354 of nixos-config:pr618:nixosConfigurations.not522-installer
Hydra checks.x86_64-linux.containers-default Hydra build #23349 of nixos-config:pr618:checks.x86_64-linux.containers-default
fix eval
2024-11-03 11:31:10 +01:00

17 lines
515 B
Nix

{pkgs, ...}: {
programs.fish.enable = true;
home-manager.users.root.imports = [
./home-manager.nix
];
programs.bash.interactiveShellInit = ''
for user in root; do
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
'';
}