kubenix/flake.nix

49 lines
1.2 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";
};
2020-12-29 11:16:27 +01:00
outputs = { self, nixpkgs, flake-utils }:
2021-04-03 21:57:02 -07:00
{ nixosModules = import ./modules; }
//
(flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlay
];
config = { };
};
in
rec {
2021-04-29 17:13:33 -05:00
devShell = import ./shell.nix { inherit system pkgs; };
2021-04-03 21:57:02 -07:00
packages = flake-utils.lib.flattenTree {
inherit (pkgs)
kubenix
;
};
hydraJobs = {
inherit packages;
};
}
)
) //
{
overlay = final: prev: {
kubenix = prev.callPackage ./default.nix {
2020-12-29 11:16:27 +01:00
nixosPath = "${nixpkgs}/nixos";
};
2021-04-29 17:13:33 -05:00
# up to date versions of their nixpkgs equivalents
kubernetes = prev.callPackage ./pkgs/applications/networking/cluster/kubernetes { };
kubectl = prev.callPackage ./pkgs/applications/networking/cluster/kubectl { };
2021-04-03 21:57:02 -07:00
};
};
2020-12-29 11:16:27 +01:00
}