mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
e5208af780
Create bma-init
26 lines
443 B
Nix
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;
|
|
};
|
|
}
|