Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.nushell.enable

Whether to enable nushell.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.nushell.package

The nushell package to use.

Type: null or package

Default:

pkgs.nushell

Declared by:

programs.nushell.configDir

Location of the nushell config directory. This directory contains the config.nu, env.nu, and login.nu files, as well as history and plugin files.

Type: string or absolute path

Default:

if pkgs.stdenv.isDarwin && !config.xdg.enable then
  "Library/Application Support/nushell"
else
  "${config.xdg.configHome}/nushell";

Declared by:

programs.nushell.configFile

The configuration file to be used for nushell.

See https://www.nushell.sh/book/configuration.html#configuration for more information.

Type: null or (submodule)

Default:

null

Example:

{
  text = ''
    const NU_LIB_DIRS = $NU_LIB_DIRS ++ ${
      lib.hm.nushell.toNushell (lib.concatStringsSep ":" [ ./scripts ])
    }
    $env.config.filesize_metric = false
    $env.config.table_mode = 'rounded'
    $env.config.use_ls_colors = true
  '';
}

Declared by:

programs.nushell.configFile.source

Path of the nushell config.nu file to use. If the text option is set, it will be preferred.

Type: null or absolute path

Default:

null

Declared by:

programs.nushell.configFile.text

Text of the nushell config.nu file. If unset then the source option will be preferred.

Type: strings concatenated with “\n”

Default:

if source is defined, the content of source, otherwise empty

Declared by:

programs.nushell.envFile

The environment variables file to be used for nushell.

See https://www.nushell.sh/book/configuration.html#configuration for more information.

Type: null or (submodule)

Default:

null

Example:

''
  $env.FOO = 'BAR'
''

Declared by:

programs.nushell.envFile.source

Path of the nushell env.nu file to use. If the text option is set, it will be preferred.

Type: null or absolute path

Default:

null

Declared by:

programs.nushell.envFile.text

Text of the nushell env.nu file. If unset then the source option will be preferred.

Type: strings concatenated with “\n”

Default:

if source is defined, the content of source, otherwise empty

Declared by:

programs.nushell.environmentVariables

Environment variables to be set.

Inline values can be set with lib.hm.nushell.mkNushellInline.

Type: attribute set of (null or (Nushell inline value) or boolean or signed integer or floating point number or string or absolute path or (attribute set of Nushell values) or (list of Nushell values))

Default:

{ }

Example:

{
  FOO = "BAR";
  LIST_VALUE = [ "foo" "bar" ];
  PROMPT_COMMAND = lib.hm.nushell.mkNushellInline ''{|| "> "}'';
  ENV_CONVERSIONS.PATH = {
    from_string = lib.hm.nushell.mkNushellInline "{|s| $s | split row (char esep) }";
    to_string = lib.hm.nushell.mkNushellInline "{|v| $v | str join (char esep) }";
  };
}

Declared by:

programs.nushell.extraConfig

Additional configuration to add to the nushell configuration file.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.nushell.extraEnv

Additional configuration to add to the nushell environment variables file.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.nushell.extraLogin

Additional configuration to add to the nushell login file.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.nushell.loginFile

The login file to be used for nushell upon logging in.

See https://www.nushell.sh/book/configuration.html#configuring-nu-as-a-login-shell for more information.

Type: null or (submodule)

Default:

null

Example:

''
  # Prints "Hello, World" upon logging into tty1
  if (tty) == "/dev/tty1" {
    echo "Hello, World"
  }
''

Declared by:

programs.nushell.loginFile.source

Path of the nushell login.nu file to use. If the text option is set, it will be preferred.

Type: null or absolute path

Default:

null

Declared by:

programs.nushell.loginFile.text

Text of the nushell login.nu file. If unset then the source option will be preferred.

Type: strings concatenated with “\n”

Default:

if source is defined, the content of source, otherwise empty

Declared by:

programs.nushell.plugins

A list of nushell plugins to write to the plugin registry file.

Type: list of package

Default:

[ ]

Example:

[ pkgs.nushellPlugins.formats ]

Declared by:

programs.nushell.settings

Nushell settings. These will be flattened and assigned one by one to $env.config to avoid overwriting the default or existing options.

For example:

{
  show_banner = false;
  completions.external = {
    enable = true;
    max_results = 200;
  };
}

becomes:

$env.config.completions.external.enable = true
$env.config.completions.external.max_results = 200
$env.config.show_banner = false

Type: attribute set of (null or (Nushell inline value) or boolean or signed integer or floating point number or string or absolute path or (attribute set of Nushell values) or (list of Nushell values))

Default:

{ }

Example:

{
  history = {
    format = "sqlite";
  };
  show_banner = false;
}

Declared by:

programs.nushell.shellAliases

An attribute set that maps aliases (the top level attribute names in this option) to command strings or directly to build outputs.

Type: attribute set of string

Default:

{ }

Example:

{
  g = "git";
  ll = "ls -l";
}

Declared by: