X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fdatabases%2Fpostgresql_replication.nix;h=6ac2455a9eea3632c783de3a8fc937aedbe57087;hb=9f16e659f129dd8acab7d086ef9822673a01ba06;hp=7172c5e6e31f9c2046574a80b81e15571c5742c7;hpb=a071d8a6af7b8130047b3997c34b15f71089a4e5;p=perso%2FImmae%2FConfig%2FNix.git 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 Base path to put the replications ''; }; + mainPackage = lib.mkOption { + type = lib.types.package; + default = pkgs.postgresql; + description = '' + Postgresql package available in shell + ''; + }; hosts = lib.mkOption { default = {}; description = '' @@ -43,10 +50,6 @@ in }; config = lib.mkIf cfg.enable { - nixpkgs.overlays = [ (self: super: { - postgresql = self.postgresql_11_custom; - }) ]; - users.users.postgres = { name = "postgres"; uid = config.ids.uids.postgres; @@ -57,7 +60,7 @@ in extraGroups = [ "keys" ]; }; users.groups.postgres.gid = config.ids.gids.postgres; - environment.systemPackages = [ pkgs.postgresql ]; + environment.systemPackages = [ cfg.mainPackage ]; secrets.keys = lib.flatten (lib.mapAttrsToList (name: hcfg: [ {