mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:33:57 +00:00
26 lines
455 B
Nix
26 lines
455 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 (lib.mdDoc "bash-my-aws");
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
environment.systemPackages = with pkgs; [ bash-my-aws ];
|
||
|
|
||
|
programs.bash.interactiveShellInit = initScript;
|
||
|
};
|
||
|
}
|