{ 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; }); }