2022-01-21 16:55:29 +00:00
|
|
|
{
|
2022-02-01 00:59:09 +00:00
|
|
|
description = "devs & ops environment for nix'ing with triton";
|
2022-01-21 16:55:29 +00:00
|
|
|
|
|
|
|
inputs.devshell.url = "github:numtide/devshell";
|
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/release-21.11";
|
2022-02-01 00:59:09 +00:00
|
|
|
inputs.nixpkgsUnstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2022-01-21 16:55:29 +00:00
|
|
|
inputs.nixpkgs20-09.url = "github:nixos/nixpkgs/release-20.09";
|
|
|
|
|
2022-01-25 17:34:13 +00:00
|
|
|
outputs = { self, flake-utils, devshell, nixpkgs, nixpkgsUnstable, nixpkgs20-09 }:
|
2022-01-21 16:55:29 +00:00
|
|
|
flake-utils.lib.eachDefaultSystem (system: {
|
|
|
|
|
2022-02-01 00:59:09 +00:00
|
|
|
# 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; inherit system; };
|
2022-01-21 16:55:29 +00:00
|
|
|
|
2022-02-01 00:59:09 +00:00
|
|
|
devShell =
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
2022-01-21 16:55:29 +00:00
|
|
|
|
2022-02-01 00:59:09 +00:00
|
|
|
overlays = [ devshell.overlay ];
|
|
|
|
};
|
|
|
|
pkgsUnstable = import nixpkgsUnstable {
|
|
|
|
inherit system;
|
2022-01-21 16:55:29 +00:00
|
|
|
|
2022-02-01 00:59:09 +00:00
|
|
|
overlays = [ devshell.overlay ];
|
|
|
|
};
|
|
|
|
pkgs20-09 = import nixpkgs20-09 {
|
|
|
|
inherit system;
|
2022-01-21 16:55:29 +00:00
|
|
|
|
2022-02-01 00:59:09 +00:00
|
|
|
overlays = [ devshell.overlay ];
|
2022-01-21 16:55:29 +00:00
|
|
|
};
|
2022-02-01 00:59:09 +00:00
|
|
|
|
|
|
|
# HINT: add your extra pkgs here,
|
|
|
|
# they'll get appended to devshell.packages in ./tritonshell.nix
|
|
|
|
extraDevshellPkgs = [
|
|
|
|
pkgsUnstable.consul
|
|
|
|
pkgsUnstable.nomad
|
|
|
|
pkgsUnstable.terraform
|
|
|
|
pkgsUnstable.vault
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
|
|
|
import ./tritonshell.nix { inherit extraDevshellPkgs devshell pkgs pkgsUnstable pkgs20-09 self system; };
|
|
|
|
}) // {
|
|
|
|
# merge this into the attr set above
|
2022-02-01 01:07:35 +00:00
|
|
|
defaultTemplate.description = "nix flake new -t 'git+https://git.greenbaum.cloud/greenbaum.cloud/tritonshell' tritonshell";
|
|
|
|
defaultTemplate.path = "./";
|
2022-02-01 00:59:09 +00:00
|
|
|
};
|
2022-01-21 16:55:29 +00:00
|
|
|
}
|