1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

refactor: get rid of providedDomains in favor of globals

This commit is contained in:
oddlama 2024-06-02 16:59:14 +02:00
parent b6cd74c732
commit 68b12b865c
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
31 changed files with 103 additions and 107 deletions

View file

@ -1,11 +1,11 @@
{
config,
globals,
lib,
nodes,
pkgs,
...
}: let
sentinelCfg = nodes.sentinel.config;
forgejoDomain = "git.${config.repo.secrets.global.domains.me}";
in {
wireguard.proxy-sentinel = {
@ -26,9 +26,8 @@ in {
inherit (config.services.forgejo) group;
};
globals.services.forgejo.domain = forgejoDomain;
nodes.sentinel = {
networking.providedDomains.forgejo = forgejoDomain;
# Rewrite destination addr with dnat on incoming connections
# and masquerade responses to make them look like they originate from this host.
# - 9922 (wan) -> 22 (proxy-sentinel)
@ -190,7 +189,7 @@ in {
["--name" providerName]
["--provider" "openidConnect"]
["--key" clientId]
["--auto-discover-url" "https://${sentinelCfg.networking.providedDomains.kanidm}/oauth2/openid/${clientId}/.well-known/openid-configuration"]
["--auto-discover-url" "https://${globals.services.kanidm.domain}/oauth2/openid/${clientId}/.well-known/openid-configuration"]
["--scopes" "email"]
["--scopes" "profile"]
["--group-claim-name" "groups"]