Files
aloslider c92b90e406 Small modules config restructure
Changed variables names in every module
2026-10-31 19:48:50 +03:00

27 lines
744 B
Nix

{ config, lib, ... }:
with lib;
let
rootCfg = config.selfhosted;
moduleCfg = rootCfg.transmute;
domain = "${config.sops.placeholder."domains/serv"}";
pocketIdSubdomain = rootCfg.pocket-id.subdomain;
in
{
config = mkIf moduleCfg.enable {
sops.secrets = {
"transmute/client_secret" = { };
};
sops.templates."transmute.env".content = ''
APP_URL=https://${moduleCfg.subdomain}.${domain}
OIDC_AUTO_LAUNCH=false
OIDC_ISSUER_URL=https://${pocketIdSubdomain}.${domain}
OIDC_CLIENT_ID=transmute
OIDC_CLIENT_SECRET=${config.sops.placeholder."transmute/client_secret"}
OIDC_DISPLAY_NAME=PocketID
OIDC_USERNAME_CLAIM=preferred_username
OIDC_AUTO_CREATE_USERS=true
'';
};
}