From 74cc1b074bbaaebc35a9214f2635569e709077a6 Mon Sep 17 00:00:00 2001 From: kat witch Date: Sat, 4 Sep 2021 23:05:09 +0100 Subject: [PATCH] services/glauth: typo fixes --- config/hosts/daiyousei/nixos.nix | 1 + config/modules/nixos/glauth.nix | 12 ++++++------ config/services/glauth/default.nix | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/config/hosts/daiyousei/nixos.nix b/config/hosts/daiyousei/nixos.nix index a61bbd9e..e716a7cf 100644 --- a/config/hosts/daiyousei/nixos.nix +++ b/config/hosts/daiyousei/nixos.nix @@ -4,6 +4,7 @@ profiles.hardware.oracle.ubuntu services.nginx services.keycloak + services.glauth ]; kw.oci = { diff --git a/config/modules/nixos/glauth.nix b/config/modules/nixos/glauth.nix index 4c4cabb0..af781375 100644 --- a/config/modules/nixos/glauth.nix +++ b/config/modules/nixos/glauth.nix @@ -1,6 +1,6 @@ { config, pkgs, lib, ... }: with lib; let - cfg = options.services.glauth; - dbcfg = options.services.glauth.database; + cfg = config.services.glauth; + dbcfg = config.services.glauth.database; in { options.services.glauth = { @@ -9,12 +9,12 @@ in type = types.package; default = pkgs.glauth; }; - outTOML = { + outTOML = mkOption { description = "The TOML produced from cfg.settings"; - type = type.str; + type = types.str; default = toTOML cfg.settings; }; - configFile = { + configFile = mkOption { description = "The config path that GLAuth uses"; type = types.path; default = pkgs.writeText "glauth-config" cfg.outTOML; @@ -63,7 +63,7 @@ in datastore = "plugin"; plugin = "bin/${cfg.database.type}.so"; pluginhandler = pluginHandlers.${dbcfg.type}; - database = if dbcfg.type != "sqlite" then (builtins.replaceStrings (singleton "\n") (singleton " ") '' + database = if (dbcfg.type != "sqlite") then (builtins.replaceStrings (singleton "\n") (singleton " ") '' host=${dbcfg.host} port=${dbcfg.port} dbname=glauth diff --git a/config/services/glauth/default.nix b/config/services/glauth/default.nix index bb0cc571..0d5c9879 100644 --- a/config/services/glauth/default.nix +++ b/config/services/glauth/default.nix @@ -36,7 +36,7 @@ }; kw.secrets.variables = mapListToAttrs (field: - nameValuePair = "glauth-${field}" { + nameValuePair "glauth-${field}" { path = "services/glauth"; inherit field; }) ["password-hash" "postgres"]; @@ -48,9 +48,9 @@ group = "glauth"; }; glauth-config-file = { - text = services.glauth.outTOML; + text = config.services.glauth.outTOML; owner = "glauth"; group = "glauth"; }; }; -}; +}