mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
23 lines
440 B
Nix
23 lines
440 B
Nix
{ 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 = {
|
|
enable = lib.mkEnableOption "bash-my-aws";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages = with pkgs; [ bash-my-aws ];
|
|
|
|
programs.bash.interactiveShellInit = initScript;
|
|
};
|
|
}
|