anchor.diff:          
           ${cfg.loginShellInit}
   
  -        # and leave a note to our children to spare them the same work
  -        set -gx __fish_nixos_login_config_sourced 1
  +        # 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
         end
   
  -      # if our parent shell didn't source the interactive config, do it
  +      # if we haven't sourced the interactive config, do it
         status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced
         and begin
           ${fishAliases}
  
positive.code:     environment.etc."fish/foreign-env/interactiveShellInit".text = cfge.interactiveShellInit;
  
      environment.etc."fish/nixos-env-preinit.fish".text = ''
        # avoid clobbering the environment if it's been set by a parent shell
  
        # 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
  
negative.code:         
          ${cfg.shellInit}
  
          # 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
        end
  
        # if we haven't sourced the login config, do it
        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
  