Change:
Fish usually has available, but the aliases are now missing, when the shell is not a login shell (presumably because of ). Have Then launch as a not-login shell. Try to use . System: 17.09pre107265. (Hummingbird)
Agh, what a mess. Thanks for raising this issue.
I think this issue is a little subtler than one would think: aliases are sourced, but only when the parent shell has not already sourced the interactive configuration. This is out of line with the behavior of the other shells on NixOS. I have a fix which I've tested with your example here. I will post a link to the relevant PR momentarily (after I put it up).
So apparently outgoing SSH is blocked from the WiFi on this cruise ship, so I can't push commits with the remotes I have set up, and my sister is nagging me to get off the computer so we can go out. If you need a quick fix on your own machine (I will be back later today, while I still have internet access, to submit the new PR), just change the lines in the NixOS module for fish () to and your aliases will get sourced every time the shell starts, so changes will be reflected without a reboot or manually unsetting the relevant variable before starting a new shell (). (The latter will do the trick if you want a quick fix without any changes to your Nixpkgs tree.)
there's a fix in this commit:
Thanks!

Discussion:
environment.etc."fish/foreign-env/interactiveShellInit".text = cfge.interactiveShellInit; environment.etc."fish/nixos-env-preinit.fish".text = '' <del> # avoid clobbering the environment if it's been set by a parent shell </del> # This happens before $__fish_datadir/config.fish sets fish_function_path, so it is currently # unset. We set it and then completely erase it, leaving its configuration to $__fish_datadir/config.fish set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $__fish_datadir/functions

environment.etc."fish/config.fish".text = '' # /etc/fish/config.fish: DO NOT EDIT -- this file has been generated automatically. <del> # if our parent shell didn't source the general config, do it </del> <ins> # if we haven't sourced the general config, do it </ins> if not set -q __fish_nixos_general_config_sourced set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path fenv source /etc/fish/foreign-env/shellInit > /dev/null

${cfg.shellInit} <del> # and leave a note to our children to spare them the same work set -gx __fish_nixos_general_config_sourced 1 </del> <ins> # and leave a note so we don't source this config section again from # this very shell (children will source the general config anew) set -g __fish_nixos_general_config_sourced 1 </ins> end <del> # if our parent shell didn't source the login config, do it </del> <ins> # if we haven't sourced the login config, do it </ins> status --is-login; and not set -q __fish_nixos_login_config_sourced and begin set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path

${cfg.loginShellInit} <del> # and leave a note to our children to spare them the same work set -gx __fish_nixos_login_config_sourced 1 </del> <ins> # and leave a note so we don't source this config section again from # this very shell (children will source the general config anew) set -g __fish_nixos_login_config_sourced 1 </ins> end <del> # if our parent shell didn't source the interactive config, do it </del> <ins> # if we haven't sourced the interactive config, do it </ins> status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced and begin ${fishAliases}

${cfg.promptInit} ${cfg.interactiveShellInit} <del> # and leave a note to our children to spare them the same work set -gx __fish_nixos_interactive_config_sourced 1 </del> <ins> # and leave a note so we don't source this config section again from # this very shell (children will source the general config anew, # allowing configuration changes in, e.g, aliases, to propagate) set -g __fish_nixos_interactive_config_sourced 1 </ins> end '';

''; fishPreInitHooks = '' <del> # source nixos environment if we're a login shell </del> <ins> # source nixos environment # note that this is required: #   1. For all shells, not just login shells (mosh needs this as do some other command-line utilities) #   2. Before the shell is initialized, so that config snippets can find the commands they use on the PATH </ins> builtin status --is-login <ins> or test -z "$__fish_nixos_env_preinit_sourced" -a -z "$ETC_PROFILE_SOURCED" -a -z "$ETC_ZSHENV_SOURCED" </ins> and test -f /etc/fish/nixos-env-preinit.fish and source /etc/fish/nixos-env-preinit.fish <ins> and set -gx __fish_nixos_env_preinit_sourced 1 </ins> test -n "$NIX_PROFILES" and begin