Small modules config restructure

Changed variables names in every module
This commit is contained in:
aloslider committed 2026-10-31 19:48:50 +03:00
1 parent c1d2e52bf8
commit c92b90e406
83 files changed
+616 -523

No files matched your search

@@ -1,12 +1,13 @@
{ config, lib, ... }:
with lib;
let
rootCfg = config.selfhosted.mail;
rootCfg = config.selfhosted;
moduleCfg = rootCfg.mail;
domain = config.sops.placeholder."domains/serv";
sessionSecret = config.sops.placeholder."bulwark/session_secret";
in
{
config = mkIf rootCfg.enable {
config = mkIf moduleCfg.enable {
sops.templates."bulwark.env".content = ''
HOSTNAME=0.0.0.0
PORT=3000
@@ -15,17 +16,17 @@ in
STALWART_FEATURES=true
BULWARK_TELEMETRY=off
SETTINGS_SYNC_ENABLED=true
JMAP_SERVER_URL=https://${rootCfg.stalwart.subdomain}.${domain}
JMAP_SERVER_URL=https://${moduleCfg.stalwart.subdomain}.${domain}
ADMIN_PASSWORD=${config.sops.placeholder."bulwark/admin_password"}
SESSION_SECRET=${sessionSecret}
COOKIE_SAME_SITE=none
ALLOWED_FRAME_ANCESTORS=https://${rootCfg.stalwart.subdomain}.${domain}
NEXT_PUBLIC_PARENT_ORIGIN=https://${rootCfg.stalwart.subdomain}.${domain}
ALLOWED_FRAME_ANCESTORS=https://${moduleCfg.stalwart.subdomain}.${domain}
NEXT_PUBLIC_PARENT_ORIGIN=https://${moduleCfg.stalwart.subdomain}.${domain}
OAUTH_ENABLED=true
OAUTH_ONLY=true
AUTO_SSO_ENABLED=true
OAUTH_ISSUER_URL=https://${config.selfhosted.pocket-id.subdomain}.${domain}
OAUTH_ISSUER_URL=https://${rootCfg.pocket-id.subdomain}.${domain}
OAUTH_CLIENT_ID=bulwark
OAUTH_SCOPES=openid email profile
OAUTH_ALLOW_PRIVATE_ENDPOINTS=true