mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
glauth: Further work
This commit is contained in:
parent
5920dc9595
commit
199be9a7db
4 changed files with 9 additions and 6 deletions
|
|
@ -21,7 +21,7 @@ in
|
|||
};
|
||||
database = {
|
||||
enable = mkEnableOption "use a database";
|
||||
local = mkEnableOption "local database creation";
|
||||
local = mkEnableOption "local database creation" // { default = true; };
|
||||
type = mkOption {
|
||||
type = types.enum [
|
||||
"postgres"
|
||||
|
|
@ -77,7 +77,7 @@ in
|
|||
};
|
||||
config =
|
||||
let
|
||||
localCheck = dbcfg.local && dbcfg.host != "localhost";
|
||||
localCheck = dbcfg.local && dbcfg.enable && dbcfg.host == "localhost";
|
||||
postgresCheck = localCheck && dbcfg.type == "postgres";
|
||||
mysqlCheck = localCheck && dbcfg.type == "mysql";
|
||||
in
|
||||
|
|
@ -173,4 +173,6 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ kittywitch ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
configFile = config.secrets.files.glauth-config-file.path;
|
||||
database = {
|
||||
enable = true;
|
||||
local = true;
|
||||
type = "postgres";
|
||||
passwordFile = config.secrets.files.glauth-postgres-file.path;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue