aboutsummaryrefslogtreecommitdiff
path: root/.config/nixpkgs/shells/ansible-mitogen.nix
blob: e5118b04f313e3fe3b7f02e99b2d6a32d59e31a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
with import <nixpkgs> {};

mkShell {

  name = "ansible";
  buildInputs = with python38.pkgs; [ pip ];
  shellHook = ''
    export virtualenvs=$HOME/.local/share/virtualenvs
    mkdir -p $virtualenvs
    python -m venv $virtualenvs/ansible-mitogen
    . $virtualenvs/ansible-mitogen/bin/activate
    python -m pip install mitogen
    export ANSIBLE_STRATEGY_PLUGINS=$virtualenvs/ansible-mitogen/lib/python3.8/site-packages/ansible_mitogen/plugins
    export ANSIBLE_STRATEGY=mitogen_linear
    export PS1='(ansible-mitogen) '
  '';
}