From c9294e30d9d8b8167a7064f74a79c051dd9dabf3 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 6 Jan 2018 01:10:20 -0800 Subject: [PATCH] bash: add option `historyFile` --- modules/programs/bash.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index b5ac9417..115fa7ab 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -21,6 +21,12 @@ in 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 { type = types.int; default = 100000; @@ -136,8 +142,9 @@ in historyControlStr = concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") ( { - HISTSIZE = toString cfg.historySize; + HISTFILE = "\"${cfg.historyFile}\""; HISTFILESIZE = toString cfg.historyFileSize; + HISTSIZE = toString cfg.historySize; } // optionalAttrs (cfg.historyControl != []) { HISTCONTROL = concatStringsSep ":" cfg.historyControl;