dotfiles/modules/nixos/services/postgresql.nix

23 lines
462 B
Nix
Raw Permalink Normal View History

{ config, pkgs, lib, ... }: {
2024-01-17 00:58:01 +00:00
services.postgresql = {
package = pkgs.postgresql_15;
2024-01-17 00:58:01 +00:00
settings = { };
identMap = "";
ensureUsers = [{
name = config.user;
ensureClauses = {
createdb = true;
createrole = true;
login = true;
};
}];
};
home-manager.users.${config.user}.home.packages =
lib.mkIf config.services.postgresql.enable [
pkgs.pgcli # Postgres client with autocomplete
];
2024-01-17 00:58:01 +00:00
}