1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-14 11:37:37 +00:00
turboprop/flake.nix

55 lines
1.3 KiB
Nix
Raw Normal View History

{
2023-11-15 16:43:46 +00:00
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
{
2023-11-27 06:36:27 +00:00
inherit rake;
2023-11-27 07:53:47 +00:00
chartData = rake.leaves ./charts;
}
// flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
2023-11-15 06:55:56 +00:00
kubelib = nix-kube-generators.lib {inherit pkgs;};
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;
in {
packages = rec {
2023-11-27 07:53:47 +00:00
inherit charts lib;
default = lib;
flakeBuilders = user: import ./lib/flake-builders.nix {
inherit charts lib pkgs user;
};
};
formatter = pkgs.alejandra;
});
}