diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index 6338f5e4a..60d1358d3 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -30,8 +30,8 @@ in }; historyFile = mkOption { - type = types.str; - default = "$HOME/.bash_history"; + type = types.nullOr types.str; + default = null; description = "Location of the bash history file."; }; @@ -157,10 +157,12 @@ in historyControlStr = concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") ( { - HISTFILE = "\"${cfg.historyFile}\""; HISTFILESIZE = toString cfg.historyFileSize; HISTSIZE = toString cfg.historySize; } + // optionalAttrs (cfg.historyFile != null) { + HISTFILE = "\"${cfg.historyFile}\""; + } // optionalAttrs (cfg.historyControl != []) { HISTCONTROL = concatStringsSep ":" cfg.historyControl; }