From f9850d10abdd33731fad5b89a6a0caa0b7350bae Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 17 Sep 2025 21:13:35 +0200 Subject: [PATCH] Update controller.nix --- clanServices/zitadel/roles/controller.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/clanServices/zitadel/roles/controller.nix b/clanServices/zitadel/roles/controller.nix index 4b12b9c..38c1595 100644 --- a/clanServices/zitadel/roles/controller.nix +++ b/clanServices/zitadel/roles/controller.nix @@ -1,10 +1,18 @@ -{ instanceName, settings, machine, roles, config, ... }: { +{ instanceName, settings, machine, roles, config, pkgs, ... }: { config = { clan.core.vars.generators = { zitadel = { share = false; + + files.initial-admin-password = { secret = true; deploy = true; }; + + runtimeInputs = with pkgs; [ pwgen ]; + + script = '' + pwgen 50 1 > "$out/token" + ''; }; - } + }; services.zitadel.steps.${instanceName} = { InstanceName = settings.hostName; @@ -19,7 +27,7 @@ Address = "chris@kruining.eu"; Verified = true; }; - Password = "KaasIsAwesome1!"; + Password = config.clan.core.vars.generators.zitadel.initial-admin-password.value; }; }; };