aboutsummaryrefslogtreecommitdiff
path: root/modules/private/databases/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-12 00:24:23 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-20 04:12:27 +0100
commitab8f306d7c2c49b8116e1af7b355ed2384617ed9 (patch)
treed1061ec0436fd096de2332a892eb984c63cb125e /modules/private/databases/default.nix
parent4227853a03923e04daf3dd511a4b5a1ab5d527e7 (diff)
downloadNix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.gz
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.zst
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.zip
Add specification for the private config file as a module.
Diffstat (limited to 'modules/private/databases/default.nix')
-rw-r--r--modules/private/databases/default.nix40
1 files changed, 20 insertions, 20 deletions
diff --git a/modules/private/databases/default.nix b/modules/private/databases/default.nix
index 7371410..8c5eb9a 100644
--- a/modules/private/databases/default.nix
+++ b/modules/private/databases/default.nix
@@ -1,4 +1,4 @@
1{ lib, config, myconfig, nodes, ... }: 1{ lib, config, nodes, ... }:
2let 2let
3 cfg = config.myServices.databases; 3 cfg = config.myServices.databases;
4in 4in
@@ -18,49 +18,49 @@ in
18 mariadb = { 18 mariadb = {
19 enable = true; 19 enable = true;
20 ldapConfig = { 20 ldapConfig = {
21 inherit (myconfig.env.ldap) host base; 21 inherit (config.myEnv.ldap) host base;
22 inherit (myconfig.env.databases.mysql.pam) dn filter password; 22 inherit (config.myEnv.databases.mysql.pam) dn filter password;
23 }; 23 };
24 replicationLdapConfig = { 24 replicationLdapConfig = {
25 inherit (myconfig.env.ldap) host base; 25 inherit (config.myEnv.ldap) host base;
26 inherit (myconfig.env.ldap.eldiron) dn password; 26 inherit (config.myEnv.servers.eldiron.ldap) dn password;
27 }; 27 };
28 credentials.root = myconfig.env.databases.mysql.systemUsers.root; 28 credentials.root = config.myEnv.databases.mysql.systemUsers.root;
29 }; 29 };
30 30
31 openldap = { 31 openldap = {
32 accessFile = "${myconfig.privateFiles}/ldap.conf"; 32 accessFile = "${config.myEnv.privateFiles}/ldap.conf";
33 baseDn = myconfig.env.ldap.base; 33 baseDn = config.myEnv.ldap.base;
34 rootDn = myconfig.env.ldap.root_dn; 34 rootDn = config.myEnv.ldap.root_dn;
35 rootPw = myconfig.env.ldap.root_pw; 35 rootPw = config.myEnv.ldap.root_pw;
36 enable = true; 36 enable = true;
37 }; 37 };
38 38
39 postgresql = { 39 postgresql = {
40 ldapConfig = { 40 ldapConfig = {
41 inherit (myconfig.env.ldap) host base; 41 inherit (config.myEnv.ldap) host base;
42 inherit (myconfig.env.databases.postgresql.pam) dn filter password; 42 inherit (config.myEnv.databases.postgresql.pam) dn filter password;
43 }; 43 };
44 replicationLdapConfig = { 44 replicationLdapConfig = {
45 inherit (myconfig.env.ldap) host base; 45 inherit (config.myEnv.ldap) host base;
46 inherit (myconfig.env.ldap.eldiron) dn password; 46 inherit (config.myEnv.servers.eldiron.ldap) dn password;
47 }; 47 };
48 authorizedHosts = { 48 authorizedHosts = {
49 immaeEu = [{ 49 immaeEu = [{
50 ip4 = [ 50 ip4 = [
51 myconfig.env.servers.immaeEu.ips.main.ip4 51 config.myEnv.servers.immaeEu.ips.main.ip4
52 myconfig.env.servers.immaeEu.ips.alt.ip4 52 config.myEnv.servers.immaeEu.ips.alt.ip4
53 ]; 53 ];
54 }]; 54 }];
55 }; 55 };
56 replicationHosts = { 56 replicationHosts = {
57 backup-1 = { 57 backup-1 = {
58 ip4 = [myconfig.env.servers.backup-1.ips.main.ip4]; 58 ip4 = [config.myEnv.servers.backup-1.ips.main.ip4];
59 ip6 = myconfig.env.servers.backup-1.ips.main.ip6; 59 ip6 = config.myEnv.servers.backup-1.ips.main.ip6;
60 }; 60 };
61 backup-2 = { 61 backup-2 = {
62 ip4 = [myconfig.env.servers.backup-2.ips.main.ip4]; 62 ip4 = [config.myEnv.servers.backup-2.ips.main.ip4];
63 ip6 = myconfig.env.servers.backup-2.ips.main.ip6; 63 ip6 = config.myEnv.servers.backup-2.ips.main.ip6;
64 }; 64 };
65 }; 65 };
66 enable = true; 66 enable = true;