preliminary changes for password file in postgres
This commit is contained in:
parent
411e1368d5
commit
e862324afa
2 changed files with 20 additions and 7 deletions
|
@ -1,8 +1,17 @@
|
|||
{ stdenv, pkgs }:
|
||||
{ postgresUsername
|
||||
, postgresPassword
|
||||
, postgresDatabase
|
||||
{ stdenv
|
||||
, pkgs
|
||||
, lib
|
||||
}:
|
||||
{ postgresDatabase
|
||||
, postgresUsername
|
||||
, postgresPassword ? null
|
||||
, postgresPasswordFile ? null
|
||||
}:
|
||||
|
||||
assert lib.assertMsg (
|
||||
(postgresPassword == null && postgresPasswordFile != null)
|
||||
|| (postgresPassword != null && postgresPasswordFile == null)
|
||||
) "set either postgresPassword or postgresPasswordFile";
|
||||
|
||||
# From https://github.com/svanderburg/dysnomia/blob/master/dysnomia-modules/postgresql-database.in
|
||||
# and https://github.com/svanderburg/dysnomia/blob/master/tests/deployment/postgresql-database.nix
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
{ PostgresDB
|
||||
}:
|
||||
{ name
|
||||
, username
|
||||
, password
|
||||
, database
|
||||
, username
|
||||
, password ? null
|
||||
, passwordFile ? null
|
||||
, dependsOn ? {}
|
||||
}:
|
||||
|
||||
{
|
||||
inherit name;
|
||||
inherit database username password passwordFile;
|
||||
|
||||
pkg = PostgresDB {
|
||||
postgresDatabase = database;
|
||||
postgresUsername = username;
|
||||
postgresPassword = password;
|
||||
postgresDatabase = database;
|
||||
postgresPasswordFile = passwordFile;
|
||||
};
|
||||
|
||||
inherit dependsOn;
|
||||
|
|
Loading…
Reference in a new issue