1 { lib, config, secrets, ... }:
3 cfg = config.myServices.databases;
7 databases.enable = lib.mkEnableOption "my databases service";
10 config.myServices.dns.zones."immae.eu".subdomains.db-1 = lib.mkIf cfg.enable (with config.myServices.dns.helpers; ips servers.eldiron.ips.main);
11 config.myServices.databases = lib.mkIf cfg.enable {
16 inherit (config.myEnv.ldap) host base;
17 inherit (config.myEnv.databases.mysql.pam) dn filter password;
19 replicationLdapConfig = {
20 inherit (config.myEnv.ldap) host base;
21 inherit (config.myEnv.servers.eldiron.ldap) dn password;
23 credentials.root = config.myEnv.databases.mysql.systemUsers.root;
27 accessFile = secrets.ldap-conf;
28 baseDn = config.myEnv.ldap.base;
29 rootDn = config.myEnv.ldap.root_dn;
30 rootPw = config.myEnv.ldap.root_pw;
36 inherit (config.myEnv.ldap) host base;
37 inherit (config.myEnv.databases.postgresql.pam) dn filter password;
39 replicationLdapConfig = {
40 inherit (config.myEnv.ldap) host base;
41 inherit (config.myEnv.servers.eldiron.ldap) dn password;
47 ip4 = config.myEnv.servers.backup-2.ips.main.ip4;
48 ip6 = config.myEnv.servers.backup-2.ips.main.ip6;