aboutsummaryrefslogtreecommitdiff
path: root/modules/private/databases/postgresql_replication.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/databases/postgresql_replication.nix')
-rw-r--r--modules/private/databases/postgresql_replication.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/private/databases/postgresql_replication.nix b/modules/private/databases/postgresql_replication.nix
index 7172c5e..6ac2455 100644
--- a/modules/private/databases/postgresql_replication.nix
+++ b/modules/private/databases/postgresql_replication.nix
@@ -11,6 +11,13 @@ in
11 Base path to put the replications 11 Base path to put the replications
12 ''; 12 '';
13 }; 13 };
14 mainPackage = lib.mkOption {
15 type = lib.types.package;
16 default = pkgs.postgresql;
17 description = ''
18 Postgresql package available in shell
19 '';
20 };
14 hosts = lib.mkOption { 21 hosts = lib.mkOption {
15 default = {}; 22 default = {};
16 description = '' 23 description = ''
@@ -43,10 +50,6 @@ in
43 }; 50 };
44 51
45 config = lib.mkIf cfg.enable { 52 config = lib.mkIf cfg.enable {
46 nixpkgs.overlays = [ (self: super: {
47 postgresql = self.postgresql_11_custom;
48 }) ];
49
50 users.users.postgres = { 53 users.users.postgres = {
51 name = "postgres"; 54 name = "postgres";
52 uid = config.ids.uids.postgres; 55 uid = config.ids.uids.postgres;
@@ -57,7 +60,7 @@ in
57 extraGroups = [ "keys" ]; 60 extraGroups = [ "keys" ];
58 }; 61 };
59 users.groups.postgres.gid = config.ids.gids.postgres; 62 users.groups.postgres.gid = config.ids.gids.postgres;
60 environment.systemPackages = [ pkgs.postgresql ]; 63 environment.systemPackages = [ cfg.mainPackage ];
61 64
62 secrets.keys = lib.flatten (lib.mapAttrsToList (name: hcfg: [ 65 secrets.keys = lib.flatten (lib.mapAttrsToList (name: hcfg: [
63 { 66 {