{ config, pkgs, lib, system, user, allowed, secrets, ... }: { users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish users.users.nx2 = { isNormalUser = true; extraGroups = [ "networkmanager" "wheel" "audio" "video" "docker" "libvirtd" "uinput" ]; useDefaultShell = true; packages = with pkgs; []; # all in home.nix }; programs = { bash = { interactiveShellInit = '' 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 ''; }; }; }