Skip to content

Commit

Permalink
portunus: fix dex enable
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Apr 28, 2024
1 parent f7a4bfb commit f69f62d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions modules/portunus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,8 @@ in
callbackURL = "https://${cfg.domain}/oauth2/callback";
clientID = "oauth2_proxy"; # - is not allowed in environment variables
in {
dex = {
enable = lib.mkIf cfg.configureOAuth2Proxy true;
# the user has no other option to accept this and all clients are internal anyway
settings.oauth2.skipApprovalScreen = true;
};
# the user has no other option to accept this and all clients are internal anyway
dex.settings.oauth2.skipApprovalScreen = true;

oauth2_proxy = lib.mkIf cfg.configureOAuth2Proxy {
enable = true;
Expand All @@ -148,10 +145,13 @@ in
};
};

portunus.dex.oidcClients = lib.mkIf cfg.configureOAuth2Proxy [{
inherit callbackURL;
id = clientID;
}];
portunus.dex = lib.mkIf cfg.configureOAuth2Proxy {
enable = true;
oidcClients = [{
inherit callbackURL;
id = clientID;
}];
};
};

security.ldap = lib.mkIf cfg.ldapPreset {
Expand Down

0 comments on commit f69f62d

Please sign in to comment.