2023-11-15 06:09:04 +00:00
|
|
|
{
|
2023-11-15 16:43:46 +00:00
|
|
|
description = "Kubernetes deployments flake";
|
2023-11-15 06:09:04 +00:00
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
|
2023-11-27 07:41:14 +00:00
|
|
|
nix-kube-generators.url = "github:farcaller/nix-kube-generators";
|
|
|
|
nixhelm = {
|
|
|
|
url = "github:farcaller/nixhelm";
|
2023-11-18 07:22:13 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-11-15 06:09:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs @ {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
nix-kube-generators,
|
|
|
|
nixhelm,
|
2023-11-15 09:21:47 +00:00
|
|
|
}: let
|
2023-11-19 21:19:32 +00:00
|
|
|
rake = import ./lib/rake.nix;
|
2023-11-15 09:21:47 +00:00
|
|
|
in
|
|
|
|
{
|
2023-11-27 06:36:27 +00:00
|
|
|
inherit rake;
|
2023-11-27 07:53:47 +00:00
|
|
|
chartData = rake.leaves ./charts;
|
2023-11-15 09:21:47 +00:00
|
|
|
}
|
|
|
|
// flake-utils.lib.eachDefaultSystem (system: let
|
2023-11-27 07:41:14 +00:00
|
|
|
pkgs = import nixpkgs {inherit system;};
|
2023-11-15 06:55:56 +00:00
|
|
|
kubelib = nix-kube-generators.lib {inherit pkgs;};
|
2023-11-19 01:11:49 +00:00
|
|
|
lib = import ./lib {inherit charts kubelib pkgs;};
|
2023-11-27 07:53:47 +00:00
|
|
|
myCharts =
|
|
|
|
(import ./lib/flake-builders.nix {
|
|
|
|
charts = {};
|
|
|
|
inherit lib pkgs;
|
|
|
|
})
|
|
|
|
.charts
|
|
|
|
self.chartData;
|
|
|
|
|
|
|
|
charts =
|
|
|
|
pkgs.lib.attrsets.recursiveUpdate
|
|
|
|
nixhelm.chartsDerivations.${system}
|
|
|
|
myCharts;
|
2023-11-15 06:09:04 +00:00
|
|
|
in {
|
2023-11-27 07:41:14 +00:00
|
|
|
packages = rec {
|
2023-11-27 07:53:47 +00:00
|
|
|
inherit charts lib;
|
2023-11-27 07:41:14 +00:00
|
|
|
default = lib;
|
2023-11-27 08:09:33 +00:00
|
|
|
flakeBuilders = user: import ./lib/flake-builders.nix {
|
|
|
|
inherit charts lib pkgs user;
|
2023-11-27 07:41:14 +00:00
|
|
|
};
|
2023-11-15 06:09:04 +00:00
|
|
|
};
|
|
|
|
formatter = pkgs.alejandra;
|
|
|
|
});
|
|
|
|
}
|