Compare commits

...

2 commits

Author SHA1 Message Date
7e0a524364
. 2025-09-17 19:36:12 +02:00
d5d46690ae
initial set up for zitadel module 2025-09-17 19:32:28 +02:00
2 changed files with 72 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{ {
description = "Amarth Cloud's Clan services"; description = "Clan services for use with Amarth Cloud";
inputs = { inputs = {
clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz"; clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
@ -30,6 +30,7 @@
]; ];
clan.modules = { clan.modules = {
"@amarth/zitadel" = flake-parts.lib.importApply ./modules/service/zitadel/default.nix {};
"@amarth/k3s" = flake-parts.lib.importApply ./clanServices/k3s/default.nix {}; "@amarth/k3s" = flake-parts.lib.importApply ./clanServices/k3s/default.nix {};
}; };

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";
};
};
};
};
};
};
}