9e1beb6895
Rewrite of some of the Apps to Nix. Tried to convert
ApplicationSets to simple Applications with an ${env}
modifier.
40 lines
915 B
Nix
40 lines
915 B
Nix
{ lib, config, ... }:
|
|
let
|
|
cfg = config.apps.dex;
|
|
env = config.apps.env;
|
|
|
|
values = lib.apps.appValues {
|
|
inherit env;
|
|
base = ../values/dex;
|
|
extraValues = {};
|
|
};
|
|
in
|
|
{
|
|
options.apps.dex = lib.apps.appOptions {
|
|
enable = lib.mkEnableOption "Dex";
|
|
revision = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "0.16.0";
|
|
description = "Dex chart version";
|
|
};
|
|
hostname = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "Dex hostname";
|
|
default = "idp.${env}.oceanbox.io";
|
|
};
|
|
};
|
|
config = lib.apps.appConfig cfg "${env}-dex" {
|
|
namespace = "idp";
|
|
helm.releases.dex = {
|
|
inherit values;
|
|
chart = lib.helm.downloadHelmChart {
|
|
repo = "https://charts.dexidp.io";
|
|
chart = "dex";
|
|
version = cfg.revision;
|
|
chartHash = "";
|
|
};
|
|
transformer = rs: builtins.map (x: kustomize x) rs;
|
|
};
|
|
};
|
|
}
|