The bash module always assigns a value to HISTFILE in the bashrc, even
when no value is explicitly set. This makes it impossible to tell bash
to use a different HISTFILE by setting the HISTFILE environment variable
HISTFILE=/tmp/bash_history bash
This changes the default value of programs.bash.historyFile to null, and
only writes the HISTFILE=... line to the bashrc if it is changed to
something else.
Unfortunately the document generator is not smart enough to quote the
`..` alias in the documentation which is very misleading. By making it
a literal example the quotes stay.
Unfortunately, using `attrsOf` is not possible since it results in too
eager evaluation. In particular, the
home.sessionVariables = {
FOO = "Hello";
BAR = "${config.home.sessionVariables.FOO} World!";
};
example will cause an infinite recursion.
This commit restores the option type of
- `home.sessionVariables`,
- `pam.sessionVariables`,
- `programs.bash.sessionVariables`, and
- `programs.zsh.sessionVariables`
to `attrs`. It also adds test cases for the above options to avoid
regressions.
Fixes#659
This variable adds some extra flexibility in constructing the
`~/.bashrc` file. Currently the option is hidden from public
documentation since the option name is provisional.