more setting up

This commit is contained in:
Chris Kruining 2025-09-17 20:46:13 +02:00
parent 23e1bbe88a
commit dfd604f73c
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
7 changed files with 141 additions and 73 deletions

View file

@ -1,44 +1,44 @@
{ ... }:
{ lib, ... }:
let
inherit (builtins) readFile;
in
{
_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 = {};
manifest = {
name = "amarth/zitadel";
description = "Zitadel service module";
categories = [ "System" "Identity" "IAM" ];
readme = readFile ./README.md;
};
pweMachine = { instances, machine, ... }: {
#==============================================================================================================
# Controller configuration
#==============================================================================================================
roles.controller = {
interface = {
options = {};
};
perInstance = instanceArgs: {
nixosModule = lib.modules.importApply ./roles/controller.nix instanceArgs;
};
};
#==============================================================================================================
# Peer configuration
#==============================================================================================================
roles.peer = {
interface = {
options = {};
};
perInstance = instanceArgs: {
nixosModule = lib.modules.importApply ./roles/peer.nix instanceArgs;
};
};
perMachine = { instances, machine, ... }: {
nixosModule = { config, ... }: {
config = {
services.zitadel = {