athens/modules/home-assistant/postgresql.nix

15 lines
285 B
Nix

{ config, lib, pkgs, ... }:
{
services = {
postgresql = {
ensureDatabases = [ "hass" ];
ensureUsers = [{
name = "hass";
ensurePermissions = { "DATABASE hass" = "ALL PRIVILEGES"; };
}];
};
postgresqlBackup.databases = [ "hass" ];
};
}