1 { lib, config, nodes, ... }:
3 cfg = config.myServices.databases;
7 databases.enable = lib.mkEnableOption "my databases service";
8 databasesCerts = lib.mkOption {
9 description = "Default databases configurations for certificates as accepted by acme";
13 config.nixpkgs.overlays = lib.mkIf cfg.enable [ (self: super: {
14 postgresql = self.postgresql_11_custom;
17 config.myServices.databases = lib.mkIf cfg.enable {
21 inherit (config.myEnv.ldap) host base;
22 inherit (config.myEnv.databases.mysql.pam) dn filter password;
24 replicationLdapConfig = {
25 inherit (config.myEnv.ldap) host base;
26 inherit (config.myEnv.servers.eldiron.ldap) dn password;
28 credentials.root = config.myEnv.databases.mysql.systemUsers.root;
32 accessFile = "${config.myEnv.privateFiles}/ldap.conf";
33 baseDn = config.myEnv.ldap.base;
34 rootDn = config.myEnv.ldap.root_dn;
35 rootPw = config.myEnv.ldap.root_pw;
41 inherit (config.myEnv.ldap) host base;
42 inherit (config.myEnv.databases.postgresql.pam) dn filter password;
44 replicationLdapConfig = {
45 inherit (config.myEnv.ldap) host base;
46 inherit (config.myEnv.servers.eldiron.ldap) dn password;
52 ip4 = [config.myEnv.servers.backup-2.ips.main.ip4];
53 ip6 = config.myEnv.servers.backup-2.ips.main.ip6;