{ config, lib, user, staticConfigDir, ... }: let inherit (lib) mkEnableOption mkIf; hmConfig = config.home-manager.users.${user}; cfg = config.mine.bash; in { options.mine.bash = { enable = mkEnableOption "Bash shell"; }; config = { programs.bash = mkIf cfg.enable { enable = true; completion.enable = true; interactiveShellInit = lib.mkOrder 1500 '' export HISTFILE="${hmConfig.xdg.dataHome}/bash/history" export HISTIGNORE="?:??:exit:clear:reset:history*" export HISTCONTROL="ignorespace:ignoreboth:erasedups" export HISTTIMEFORMAT="[%F %T] " eval "$(oh-my-posh init bash --config '${staticConfigDir}/ohmyposh/config.omp.yaml')" set -C shopt -s autocd cdspell checkwinsize checkjobs direxpand dirspell dotglob extglob \ globstar histappend histverify nocaseglob no_empty_cmd_completion stty stop undef stty werase undef ''; }; }; }