fix modules

This commit is contained in:
Chris Kruining 2025-09-17 20:23:19 +02:00
parent bf272f6607
commit 23e1bbe88a
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
3 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,68 @@
{ ... }:
{
_class = "clan.service";
manifest.name = "zitadel";
roles = {
controller = {
interface = {
options = {};
};
perInstance = { instanceName, settings, machine, roles, ... }: {
nixosModule = { config }: {
config = {
services.zitadel.steps.${instanceName} = {
InstanceName = settings.hostName;
Org = {
Name = settings.displayName;
Human = {
UserName = "chris";
FirstName = "Chris";
LastName = "Kruining";
Email = {
Address = "chris@kruining.eu";
Verified = true;
};
Password = "KaasIsAwesome1!";
};
};
};
};
};
};
};
peer = {};
};
pweMachine = { instances, machine, ... }: {
nixosModule = { config, ... }: {
config = {
services.zitadel = {
enable = true;
settings = {
Port = 9092;
ExternalDomain = "auth.amarth.cloud";
ExternalPort = 443;
ExternalSecure = true;
Metrics.Type = "otel";
Tracing.Type = "otel";
Telemetry.Enabled = true;
SystemDefaults = {
PasswordHasher.Hasher.Algorithm = "argon2id";
SecretHasher.Hasher.Algorithm = "argon2id";
};
};
};
};
};
};
}

View file

@ -0,0 +1,15 @@
{ lib, ... }:
let
module = lib.modules.importApply ./default.nix {};
in
{
clan.modules.zitadel = module;
perSystem = { ... }: {
# clan.nixosTests.zitadel = {
# imports = [ ./tests/vm/default.nix ];
# clan.modules."@amarth/zitadel" = module;
# };
};
}