mirror of
https://git.sr.ht/~goorzhel/turboprop
synced 2024-12-14 11:37:37 +00:00
97dbdec7f7
`apiVersions` gave me a headache while writing the foldl so I made it a separate input. Now the service modules have this signature, without my having to change any code in the modules themselves: {charts, etc, ...} -> [apiVersion] -> {out, extra}
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{
|
|
description = "Templates Helm deployments using Nix";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
haumea = {
|
|
url = "github:nix-community/haumea/v0.2.2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix-kube-generators.url = "github:farcaller/nix-kube-generators";
|
|
nixhelm = {
|
|
url = "github:farcaller/nixhelm";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
self,
|
|
nixpkgs,
|
|
haumea,
|
|
flake-utils,
|
|
nix-kube-generators,
|
|
nixhelm,
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {inherit system;};
|
|
kubelib = nix-kube-generators.lib {inherit pkgs;};
|
|
lib = import ./lib {inherit charts haumea kubelib pkgs;};
|
|
|
|
charts =
|
|
pkgs.lib.attrsets.recursiveUpdate
|
|
nixhelm.chartsDerivations.${system}
|
|
(lib.mkCharts ./charts);
|
|
in {
|
|
packages = {
|
|
inherit charts lib;
|
|
default = user:
|
|
import ./src {
|
|
inherit charts haumea lib pkgs user;
|
|
};
|
|
};
|
|
# TODO: make a template
|
|
formatter = pkgs.alejandra;
|
|
});
|
|
}
|