kubenix/flake.nix

58 lines
1.5 KiB
Nix
Raw Normal View History

2020-12-29 11:16:27 +01:00
{
description = "Kubernetes resource builder using nix";
2021-04-03 21:57:02 -07:00
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
2021-05-13 01:18:12 -07:00
devshell-flake.url = "github:numtide/devshell";
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
2021-04-03 21:57:02 -07:00
};
2020-12-29 11:16:27 +01:00
2021-05-13 01:18:12 -07:00
outputs = { self, nixpkgs, flake-utils, devshell-flake, flake-compat }:
{ modules = import ./modules; }
2021-04-03 21:57:02 -07:00
//
(flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlay
2021-05-13 01:18:12 -07:00
devshell-flake.overlay
2021-04-03 21:57:02 -07:00
];
2021-05-13 01:18:12 -07:00
config = {
allowUnsupportedSystem = true;
};
2021-04-03 21:57:02 -07:00
};
in
rec {
2021-05-13 01:18:12 -07:00
devShell = with pkgs; devshell.mkShell
{
imports = [
(devshell.importTOML ./devshell.toml)
];
};
2021-04-03 21:57:02 -07:00
packages = flake-utils.lib.flattenTree {
inherit (pkgs)
kubenix
;
};
hydraJobs = {
inherit packages;
};
}
)
) //
{
overlay = final: prev: {
2021-05-28 16:20:18 -05:00
kubenix = prev.callPackage ./default.nix { };
2021-04-29 17:13:33 -05:00
# up to date versions of their nixpkgs equivalents
2021-05-13 01:18:12 -07:00
kubernetes = prev.callPackage ./pkgs/applications/networking/cluster/kubernetes
{ };
2021-04-29 17:13:33 -05:00
kubectl = prev.callPackage ./pkgs/applications/networking/cluster/kubectl { };
2021-04-03 21:57:02 -07:00
};
};
2020-12-29 11:16:27 +01:00
}