1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-09 10:16:55 +00:00
home-manager/tests/modules/programs/bash/bash-history-control-with-file.nix
Damien Cassou f99c704fe3 bash: Make sure HISTFILE's directory exists
Co-authored-by: Robert Helgesson <robert@rycee.net>
2025-02-06 12:25:09 +01:00

20 lines
368 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.bash = {
enable = true;
historyControl = [ "erasedups" ];
historyFile = "/home/hm-user/foo/bash/history";
};
nmt.script = ''
assertFileExists home-files/.bashrc
assertFileRegex home-files/.bashrc \
'^mkdir -p "\$(dirname "\$HISTFILE")"'
'';
};
}