From 6535ca50aff220cd9454b4cdb8656a98734da0e8 Mon Sep 17 00:00:00 2001 From: gabriel-doriath-dohler Date: Tue, 25 Jan 2022 23:59:59 +0000 Subject: [PATCH] add dex --- machines/core-services-01/dex.nix | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 machines/core-services-01/dex.nix diff --git a/machines/core-services-01/dex.nix b/machines/core-services-01/dex.nix new file mode 100644 index 0000000..6834f07 --- /dev/null +++ b/machines/core-services-01/dex.nix @@ -0,0 +1,41 @@ +{ config, ... }: +let + my = config.my +in +{ + services.dex = { + enable = true; + settings = { + issuer = ""; + storage = { + type = "sqlite3"; + config.file = "gitea/dex.db"; + }; + enablePasswordDB = true; + /* + web = { + http = ""; + }; + staticClients = [ + { + id = "oidcclient"; + name = "Client"; + redirectURIs = [ "/callback" ]; + secretFile = "/etc/dex/oidcclient"; + } + ]; + */ + connectors = { + type = "gitea"; + id = "gitea"; + name = "Gitea"; + config = { + clientID = ; + clientSecret = ; + redirectURL = "http://127.0.0.1:5556/dex/callback"; + baseURL = "https://git.${my.subZone}"; + }; + }; + }; + }; +}