Update default.nix

This commit is contained in:
Chris Kruining 2025-09-17 21:32:27 +02:00
parent 72fbd32392
commit dae3cfb8c3
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg

View file

@ -41,9 +41,23 @@ in
perMachine = { instances, machine, ... }: { perMachine = { instances, machine, ... }: {
nixosModule = { config, ... }: { nixosModule = { config, ... }: {
config = { config = {
clan.core.vars.generators.zitadel = {
shared = false;
files.masterKey = { deploy = true; secret = true; };
# https://zitadel.com/docs/self-hosting/manage/configure#masterkey
# The master key has to be 32 bytes
script = ''
head -c 32 /dev/urandom > $out/masterKey
'';
};
services.zitadel = { services.zitadel = {
enable = true; enable = true;
masterKeyFile = config.clan.core.vars.generators.zitadel.masterKey.path;
settings = { settings = {
Port = 9092; Port = 9092;