infra-vintage/tritonshell/flake.nix

57 lines
1.9 KiB
Nix
Raw Normal View History

2022-06-04 18:49:14 +00:00
{
description = "devs & ops environment for nix'ing with triton";
inputs.devshell.url = "github:numtide/devshell";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.nixpkgs20-09.url = "github:nixos/nixpkgs/release-20.09";
outputs = { self, flake-utils, devshell, nixpkgs, nixpkgs20-09 }:
flake-utils.lib.eachDefaultSystem (system: {
# Internal utility package with shell function and env vars helper.
# These get source'd in devshell.bash.extra when starting tritonshell
packages = {
triton-utils = import ./pkgs/triton-utils.nix { inherit nixpkgs system; };
triton-docker-env =
let
# CUSTOMIZE:
# variables used to set triton env vars in tritonshell
# adjust to suit your Triton Data Center setup
# take a look at ./pkgs/triton-docker-env-shell.nix to see how these get used
cnsBaseDomain = "greenbaum.zone";
dataCenters = [ "cgn-1" "lev-1" ];
mantaDomain = "eu-central.manta.greenbaum.cloud";
tritonApiDomain = "api.greenbaum.cloud";
in
import ./pkgs/triton-docker-env.nix {
inherit nixpkgs system cnsBaseDomain dataCenters mantaDomain
tritonApiDomain;
};
};
devShell =
let
pkgs = import nixpkgs {
inherit system;
overlays = [ devshell.overlay ];
};
pkgs20-09 = import nixpkgs20-09 {
inherit system;
overlays = [ devshell.overlay ];
};
# HINT: add your extra pkgs here,
# they'll get appended to devshell.packages in ./tritonshell.nix
extraDevshellPkgs = with pkgs; [
# used by triton-ansible-inventory
nodejs
];
in
import ./tritonshell.nix { inherit extraDevshellPkgs devshell pkgs pkgs20-09 self system; };
});
}