kubenix/flake.nix
David Arnold ee9b4adfc8
ref: non-flake compatibility
since this is purely a legacy concern (both default.nix and shell.nix),
we avoid to include the flake-compat as a flake input.

(even though unused inputs are lazily fetched - for style & clarity)
2021-05-31 17:25:05 -05:00

50 lines
1.3 KiB
Nix

{
description = "Kubernetes resource builder using nix";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
devshell-flake.url = "github:numtide/devshell";
};
outputs = { self, nixpkgs, flake-utils, devshell-flake }:
(flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlay
devshell-flake.overlay
];
config = {
allowUnsupportedSystem = true;
};
};
in
rec {
devShell = with pkgs; devshell.mkShell
{ imports = [ (devshell.importTOML ./devshell.toml) ]; };
packages = flake-utils.lib.flattenTree {
inherit (pkgs)
kubernetes
kubectl
;
};
defaultPackage = pkgs.kubenix;
}
)
) //
{
modules = import ./src/modules;
overlay = final: prev: {
kubenix = prev.callPackage ./src/kubenix.nix { };
# up to date versions of their nixpkgs equivalents
kubernetes = prev.callPackage ./pkgs/applications/networking/cluster/kubernetes
{ };
kubectl = prev.callPackage ./pkgs/applications/networking/cluster/kubectl { };
};
};
}