tritonshell/template/flake.nix
jhonas 77152c7b4a
Simplify interface to triton-utils.nix and
tritonshell.nix

- bump cacert to version 2022-04-26 from
https://curl.se/docs/caextract.html

- use overlay to get docker-compose 1.26.2 instead of old nixpkgs
  release
2022-06-09 14:25:46 +02:00

60 lines
1.9 KiB
Nix

{
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";
outputs = { self, flake-utils, devshell, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
# 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 pkgs; };
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 pkgs cnsBaseDomain dataCenters mantaDomain tritonApiDomain;
};
};
devShells.default =
let
pkgs = import nixpkgs {
inherit system;
overlays = [
devshell.overlay
(import ./overlay.nix)
];
};
# HINT: add your extra devshell pkgs here, use any packages you want
# available in your devshell's PATH
# Use https://search.nixos.org/packages to find available packages
# in the unstable channel
# These get appended to devshell.packages in ./tritonshell.nix
extraDevshellPkgs = with pkgs; [
#hello
];
in
import ./tritonshell.nix { inherit extraDevshellPkgs devshell pkgs self system; };
});
}