2020-04-24 23:36:52 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
prg = config.programs;
|
|
|
|
cfg = prg.bash-my-aws;
|
|
|
|
|
|
|
|
initScript = ''
|
|
|
|
eval $(${pkgs.bash-my-aws}/bin/bma-init)
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.bash-my-aws = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption "bash-my-aws";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2020-04-24 23:36:52 +00:00
|
|
|
environment.systemPackages = with pkgs; [ bash-my-aws ];
|
|
|
|
|
|
|
|
programs.bash.interactiveShellInit = initScript;
|
|
|
|
};
|
|
|
|
}
|