mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
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)
50 lines
1.3 KiB
Nix
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 { };
|
|
};
|
|
};
|
|
}
|