From 88428d9a3f6f146cf304b34f39225dac05092fa6 Mon Sep 17 00:00:00 2001 From: kat witch Date: Sat, 4 Sep 2021 23:02:45 +0100 Subject: [PATCH] modules/nixos/glauth: sqlite support --- config/modules/nixos/glauth.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/modules/nixos/glauth.nix b/config/modules/nixos/glauth.nix index ac5a9f5e..7ba0fbc4 100644 --- a/config/modules/nixos/glauth.nix +++ b/config/modules/nixos/glauth.nix @@ -63,14 +63,14 @@ in datastore = "plugin"; plugin = "bin/${cfg.database.type}.so"; pluginhandler = pluginHandlers.${dbcfg.type}; - database = builtins.replaceStrings (singleton "\n") (singleton " ") '' + database = if dbcfg.type != "sqlite" then (builtins.replaceStrings (singleton "\n") (singleton " ") '' host=${dbcfg.host} port=${dbcfg.port} dbname=glauth username=${dbcfg.username} password=@db-password@ sslmode=${if dbcfg.ssl then "enable" else "disable"} - ''; + '') else "database = \"gl.db\""; }; }; };