nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit 527a7978197364cb962fb459822520501088047b
parent a070c88739244c025e56aef45b7c08934348b6c7
Author: mtmn <miro@haravara.org>
Date:   Sun, 26 Apr 2026 15:32:18 +0200

nixaran: matrix to irc migration

Diffstat:
Mhosts/nixaran/configuration.nix | 0
Mmodules/services/dex.nix | 65+++++++++++++++++++++++++++++++++--------------------------------
2 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/hosts/nixaran/configuration.nix b/hosts/nixaran/configuration.nix Binary files differ. diff --git a/modules/services/dex.nix b/modules/services/dex.nix @@ -26,6 +26,10 @@ in { redirectURIs = lib.mkOption { type = lib.types.listOf lib.types.str; }; + expiry = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + default = {}; + }; }; config = lib.mkIf cfg.enable { @@ -33,43 +37,40 @@ in { services.dex = { enable = true; - settings = { - issuer = "https://${cfg.domain}"; - logger.level = "warn"; - - storage = { - type = "sqlite3"; - config.file = "/var/lib/dex/dex.db"; - }; + settings = + { + issuer = "https://${cfg.domain}"; + logger.level = "warn"; - web.http = "127.0.0.1:5556"; - telemetry.http = "127.0.0.1:5558"; + storage = { + type = "sqlite3"; + config.file = "/var/lib/dex/dex.db"; + }; - staticClients = [ - { - id = "caddy-proxy"; - inherit (cfg) redirectURIs; - name = "Caddy Auth Proxy"; - secretFile = config.age.secrets.dex-client-secret.path; - } - ]; + web.http = "127.0.0.1:5556"; + telemetry.http = "127.0.0.1:5558"; - enablePasswordDB = true; + staticClients = [ + { + id = "caddy-proxy"; + inherit (cfg) redirectURIs; + name = "Caddy Auth Proxy"; + secretFile = config.age.secrets.dex-client-secret.path; + } + ]; - expiry = { - signingKeys = "72h"; - idTokens = "72h"; - }; + enablePasswordDB = true; - staticPasswords = [ - { - email = cfg.adminEmail; - hash = cfg.adminPasswordHash; - username = cfg.adminUsername; - userID = cfg.adminUserID; - } - ]; - }; + staticPasswords = [ + { + email = cfg.adminEmail; + hash = cfg.adminPasswordHash; + username = cfg.adminUsername; + userID = cfg.adminUserID; + } + ]; + } + // lib.optionalAttrs (cfg.expiry != {}) {inherit (cfg) expiry;}; }; systemd.services.dex.serviceConfig = {