2024-01-11 11:26:46 +01:00
|
|
|
{ lib
|
|
|
|
, config
|
|
|
|
, pkgs
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (lib) mkEnableOption mkIf;
|
|
|
|
|
|
|
|
cfg = config.plusultra.cli-apps.bash;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.plusultra.cli-apps.bash = {
|
|
|
|
enable = mkEnableOption "BASH shell";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
bashInteractive
|
|
|
|
];
|
|
|
|
programs.bash = {
|
|
|
|
enable = true;
|
|
|
|
initExtra = ''
|
|
|
|
function msh() { mosh "$@" -- bash -c 'if type -f tmux; then tmux new-session -A -s 0; else screen -R; fi;' ; };
|
2024-03-06 12:25:53 +01:00
|
|
|
function tsh() { ssh -t "$@" -- bash -c 'if type -f tmux; then tmux new-session -A -s 0; else screen -R; fi;' ; };
|
2024-01-11 11:26:46 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|