Skip to content

Instantly share code, notes, and snippets.

@disassembler
Created January 17, 2018 19:25
Show Gist options
  • Select an option

  • Save disassembler/241b3ba77b2d114aa5199f2d94eb08c3 to your computer and use it in GitHub Desktop.

Select an option

Save disassembler/241b3ba77b2d114aa5199f2d94eb08c3 to your computer and use it in GitHub Desktop.
with import <nixpkgs> { };
let eyaml_env = bundlerEnv rec {
name = "eyaml_env";
ruby = ruby_2_2;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
gemConfig = pkgs.defaultGemConfig // {
gpgme = attrs: {
buildInputs = [ gpgme ];
};
};
};
mosquitto_1_1_3 = callPackage ./mosquitto.nix {};
in
stdenv.mkDerivation rec {
name = "My_env";
buildInputs = [
eyaml_env
pythonPackages.Fabric
pythonPackages.pyyaml
pkgs.pythonPackages.requests
pkgs.pythonPackages.pytz
pkgs.pythonPackages.pymongo
];
shellHook = ''
export EDITOR=nvim
echo "My Env" \
| ${pkgs.figlet}/bin/figlet -f banner -c \
| ${pkgs.lolcat}/bin/lolcat
cat <<EOF
Instructions for modifying encrypted hiera values:
$ eyaml edit <hiera_file>
Instructions for Running fabric tasks:
$ fab -l
$ fab -d <task>
$ fab loadenv:environment=foo <task>
EOF
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment