nix-dotfiles/services/postgres.nix

30 lines
506 B
Nix
Raw Normal View History

2024-06-19 09:22:51 +02:00
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
postgresql
pgadmin4
pgadmin4-desktopmode
pgmanage
postgresql_16
];
services.postgresql = {
enable = true;
package = pkgs.postgresql_16;
ensureDatabases = [ "testing" ];
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all all trust
'';
extraPlugins = with pkgs.postgresql16Packages; [postgis pg_repack pgvector];
};
}