bash: add option historyFile
This commit is contained in:
parent
d7715f71ad
commit
c9294e30d9
|
@ -21,6 +21,12 @@ in
|
||||||
description = "Number of history lines to keep in memory.";
|
description = "Number of history lines to keep in memory.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
historyFile = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "$HOME/.bash_history";
|
||||||
|
description = "Location of the bash history file.";
|
||||||
|
};
|
||||||
|
|
||||||
historyFileSize = mkOption {
|
historyFileSize = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 100000;
|
default = 100000;
|
||||||
|
@ -136,8 +142,9 @@ in
|
||||||
historyControlStr =
|
historyControlStr =
|
||||||
concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") (
|
concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") (
|
||||||
{
|
{
|
||||||
HISTSIZE = toString cfg.historySize;
|
HISTFILE = "\"${cfg.historyFile}\"";
|
||||||
HISTFILESIZE = toString cfg.historyFileSize;
|
HISTFILESIZE = toString cfg.historyFileSize;
|
||||||
|
HISTSIZE = toString cfg.historySize;
|
||||||
}
|
}
|
||||||
// optionalAttrs (cfg.historyControl != []) {
|
// optionalAttrs (cfg.historyControl != []) {
|
||||||
HISTCONTROL = concatStringsSep ":" cfg.historyControl;
|
HISTCONTROL = concatStringsSep ":" cfg.historyControl;
|
||||||
|
|
Loading…
Reference in a new issue