From 122912476731d404723feb56c81b77c8d23f923f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 6 Jan 2018 01:10:20 -0800 Subject: [PATCH] Add option programs.bash.historyFile --- modules/programs/bash.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index 90ab5dd7..213eed9b 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.path; + default = ~/.bash_history; + description = "Location of the bash history file."; + }; + historyFileSize = mkOption { type = types.int; default = 100000; @@ -153,6 +159,7 @@ in # Commands that should be applied only for interactive shells. if [[ -n $PS1 ]]; then HISTSIZE=${toString cfg.historySize} + HISTFILE=${toString cfg.historyFile} HISTFILESIZE=${toString cfg.historyFileSize} ${setIfNonEmpty "HISTCONTROL" histControlStr} ${setIfNonEmpty "HISTIGNORE" histIgnoreStr}