1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-14 11:37:37 +00:00
turboprop/flake.nix
Antonio Gurgel 84b62768b4 Add flake-builder input for user data
I stowed my particularities in lib.eureka, but exporting
`packages.*.flakeBuilders` with a pre-pressed `lib` left no way to put
the Eureka module back in. After further consideration, I decided
it's wise to keep `lib`	that way instead of commingling it with
homelab data.
2023-11-27 00:13:06 -08:00

54 lines
1.3 KiB
Nix

{
description = "Kubernetes deployments flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
nix-kube-generators.url = "github:farcaller/nix-kube-generators";
nixhelm = {
url = "github:farcaller/nixhelm";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
nix-kube-generators,
nixhelm,
}: let
rake = import ./lib/rake.nix;
in
{
inherit rake;
chartData = rake.leaves ./charts;
}
// flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
kubelib = nix-kube-generators.lib {inherit pkgs;};
lib = import ./lib {inherit charts kubelib pkgs;};
myCharts =
(import ./lib/flake-builders.nix {
charts = {};
inherit lib pkgs;
})
.charts
self.chartData;
charts =
pkgs.lib.attrsets.recursiveUpdate
nixhelm.chartsDerivations.${system}
myCharts;
in {
packages = rec {
inherit charts lib;
default = lib;
flakeBuilders = user: import ./lib/flake-builders.nix {
inherit charts lib pkgs user;
};
};
formatter = pkgs.alejandra;
});
}