2020-01-01 18:10:47 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with 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 = {
|
2022-08-28 21:18:44 +02:00
|
|
|
enable = mkEnableOption (lib.mdDoc "bash-my-aws");
|
2020-01-01 18:10:47 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [ bash-my-aws ];
|
|
|
|
|
|
|
|
programs.bash.interactiveShellInit = initScript;
|
|
|
|
};
|
|
|
|
}
|