modules/nixos/glauth: sqlite support

This commit is contained in:
kat witch 2021-09-04 23:02:45 +01:00
parent d64087e160
commit 88428d9a3f
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72

View file

@ -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\"";
};
};
};