26 lines
715 B
Nix
26 lines
715 B
Nix
{ config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.selfhosted.transmute;
|
|
domain = "${config.sops.placeholder."domains/serv"}";
|
|
pocketIdSubdomain = config.selfhosted.pocket-id.subdomain;
|
|
in
|
|
{
|
|
config = mkIf cfg.enable {
|
|
sops.secrets = {
|
|
"transmute/client_secret" = { };
|
|
};
|
|
|
|
sops.templates."transmute.env".content = ''
|
|
APP_URL=https://${cfg.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
|
|
'';
|
|
};
|
|
}
|