3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/programs/bash-my-aws.nix
Tom Bereknyei e5208af780 bash-my-aws: init at 20191231
Create bma-init
2020-01-01 14:53:15 -05:00

26 lines
443 B
Nix

{ 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 = {
enable = mkEnableOption "bash-my-aws";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ bash-my-aws ];
programs.bash.interactiveShellInit = initScript;
};
}