nixos-config/configurations/profile/home/shell/bash.nix

27 lines
767 B
Nix
Raw Permalink Normal View History

{ config, pkgs, lib, materusArg, ... }:
2024-03-11 16:19:31 +01:00
let
cfg = config.materus.profile.bash;
2023-10-08 11:42:08 +02:00
in
{
2024-03-11 16:19:31 +01:00
options.materus.profile.bash.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminal "Enable materus bash config";
2023-10-08 11:42:08 +02:00
2024-03-11 16:19:31 +01:00
config = lib.mkIf cfg.enable {
2023-10-08 11:42:08 +02:00
2024-03-11 16:19:31 +01:00
programs.bash = {
2024-04-01 22:10:17 +02:00
enable = true;
2024-03-11 16:19:31 +01:00
enableCompletion = lib.mkDefault true;
enableVteIntegration = lib.mkDefault true;
historyControl = lib.mkDefault [ "erasedups" "ignorespace" ];
shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ];
initExtra = ''
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
source "$EAT_SHELL_INTEGRATION_DIR/bash";
fi
'';
2023-10-08 11:42:08 +02:00
};
2024-03-11 16:19:31 +01:00
};
2023-10-08 11:42:08 +02:00
}