From 9f16e659f129dd8acab7d086ef9822673a01ba06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 10 Apr 2020 01:22:16 +0200 Subject: Stop using overlays in the middle of modules --- modules/private/databases/default.nix | 4 ---- modules/private/databases/postgresql_replication.nix | 13 ++++++++----- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'modules/private/databases') diff --git a/modules/private/databases/default.nix b/modules/private/databases/default.nix index c4a023a..6cd6feb 100644 --- a/modules/private/databases/default.nix +++ b/modules/private/databases/default.nix @@ -10,10 +10,6 @@ in }; }; - config.nixpkgs.overlays = lib.mkIf cfg.enable [ (self: super: { - postgresql = self.postgresql_11_custom; - }) ]; - config.myServices.databases = lib.mkIf cfg.enable { mariadb = { enable = true; 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: [ { -- cgit v1.2.3