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.bash.enable

Whether to enable GNU Bourne-Again SHell.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.bash.enableCompletion

Whether to enable Bash completion for all interactive Bash shells.

Note, if you use NixOS or nix-darwin and do not have Bash completion enabled in the system configuration, then make sure to add

  environment.pathsToLink = [ "/share/bash-completion" ];

to your system configuration to get completion for system packages. Note, the legacy /etc/bash_completion.d path is not supported by Home Manager.

Type: boolean

Default:

true

Declared by:

programs.bash.enableVteIntegration

Whether to enable integration with terminals using the VTE library. This will let the terminal track the current working directory.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.bash.package

The bash package to use.

Type: null or package

Default:

pkgs.bashInteractive

Declared by:

programs.bash.bashrcExtra

Extra commands that should be placed in ~/.bashrc. Note that these commands will be run even in non-interactive shells.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.bash.historyControl

Controlling how commands are saved on the history list.

Type: list of (one of “erasedups”, “ignoredups”, “ignorespace”, “ignoreboth”)

Default:

[ ]

Declared by:

programs.bash.historyFile

Location of the bash history file.

Type: null or string

Default:

null

Declared by:

programs.bash.historyFileSize

Number of history lines to keep on file.

Type: null or signed integer

Default:

100000

Declared by:

programs.bash.historyIgnore

List of commands that should not be saved to the history list.

Type: list of string

Default:

[ ]

Example:

[
  "ls"
  "cd"
  "exit"
]

Declared by:

programs.bash.historySize

Number of history lines to keep in memory.

Type: null or signed integer

Default:

10000

Declared by:

programs.bash.initExtra

Extra commands that should be run when initializing an interactive shell.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.bash.logoutExtra

Extra commands that should be run when logging out of an interactive shell.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.bash.profileExtra

Extra commands that should be run when initializing a login shell.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.bash.sessionVariables

Environment variables that will be set for the Bash session.

Setting a value to null will skip setting the variable at all, which may be useful when overriding.

Type: lazy attribute set of (null or string or absolute path or signed integer or floating point number or boolean)

Default:

{ }

Example:

{
  MAILCHECK = 30;
}

Declared by:

programs.bash.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:

{
  ".." = "cd ..";
  ll = "ls -l";
}

Declared by:

programs.bash.shellOptions

Shell options to set. Prefix an option with “-” to unset.

Type: list of string

Default:

[
  "histappend"
  "extglob"
  "globstar"
  "checkjobs"
]

Example:

[
  "extglob"
  "-cdspell"
]

Declared by: