mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/tests/home-assistant: replace ensureUsers with custom setup script for now
(cherry picked from commit 30d70bf605
)
This commit is contained in:
parent
5bc5fcbf4b
commit
163a50a5e1
1 changed files with 7 additions and 7 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue