nixos/tests/home-assistant: replace ensureUsers with custom setup script for now
This commit is contained in:
parent
8b5e31d92c
commit
30d70bf605
@ -9,13 +9,13 @@ in {
|
|||||||
nodes.hass = { pkgs, ... }: {
|
nodes.hass = { pkgs, ... }: {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureDatabases = [ "hass" ];
|
|
||||||
ensureUsers = [{
|
# FIXME: hack for https://github.com/NixOS/nixpkgs/issues/216989
|
||||||
name = "hass";
|
# Should be replaced with ensureUsers again when a solution for that is found
|
||||||
ensurePermissions = {
|
initialScript = pkgs.writeText "hass-setup-db.sql" ''
|
||||||
"DATABASE hass" = "ALL PRIVILEGES";
|
CREATE ROLE hass WITH LOGIN;
|
||||||
};
|
CREATE DATABASE hass WITH OWNER hass;
|
||||||
}];
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.home-assistant = {
|
services.home-assistant = {
|
||||||
|
Loading…
Reference in New Issue
Block a user