nixos/tests/home-assistant: replace ensureUsers with custom setup script for now

This commit is contained in:
K900 2023-11-04 12:23:31 +03:00
parent 8b5e31d92c
commit 30d70bf605

View File

@ -9,13 +9,13 @@ in {
nodes.hass = { pkgs, ... }: {
services.postgresql = {
enable = true;
ensureDatabases = [ "hass" ];
ensureUsers = [{
name = "hass";
ensurePermissions = {
"DATABASE hass" = "ALL PRIVILEGES";
};
}];
# FIXME: hack for https://github.com/NixOS/nixpkgs/issues/216989
# Should be replaced with ensureUsers again when a solution for that is found
initialScript = pkgs.writeText "hass-setup-db.sql" ''
CREATE ROLE hass WITH LOGIN;
CREATE DATABASE hass WITH OWNER hass;
'';
};
services.home-assistant = {