infra/shell.nix

34 lines
737 B
Nix
Raw Normal View History

{ system ? builtins.currentSystem }:
let
2021-09-29 19:09:35 +02:00
sources = import ./nix/sources.nix;
pkgs = import ./nix { inherit system; };
2020-01-22 12:37:13 +01:00
in
pkgs.mkShell {
NIX_PATH = "nixpkgs=${toString pkgs.path}";
2021-10-03 14:18:57 +02:00
# required for morph
SSH_USER = "root";
2021-09-29 19:09:35 +02:00
sopsPGPKeyDirs = [
"./keys"
];
buildInputs = with pkgs.nix-community-infra; [
git-crypt
niv
terraform
2021-09-25 22:35:51 +02:00
sops
2021-10-03 14:18:57 +02:00
morph
2021-09-29 19:09:35 +02:00
(pkgs.callPackage sources.sops-nix {}).sops-import-keys-hook
];
2020-01-12 19:32:14 +01:00
# terraform cloud without the remote execution part
TF_FORCE_LOCAL_BACKEND = "1";
TF_CLI_CONFIG_FILE = toString ./secrets/terraformrc;
shellHooks = ''
export CLOUDFLARE_API_TOKEN=$(< ./secrets/cloudflare-api-token)
2021-10-03 14:18:57 +02:00
export NIX_USER_CONF_FILES="$(pwd)/nix/nix.conf";
2020-01-12 19:32:14 +01:00
'';
}