about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-11-04 12:23:31 +0300
committerK900 <me@0upti.me>2023-11-04 12:23:31 +0300
commit30d70bf6058e2261048986b9db909ae291779d5c (patch)
treebe1f6cd89074a373ca4fc168fe853314e89ff8b6 /nixos
parent8b5e31d92caf5f46abf5c445264af4536af02799 (diff)
downloadnixlib-30d70bf6058e2261048986b9db909ae291779d5c.tar
nixlib-30d70bf6058e2261048986b9db909ae291779d5c.tar.gz
nixlib-30d70bf6058e2261048986b9db909ae291779d5c.tar.bz2
nixlib-30d70bf6058e2261048986b9db909ae291779d5c.tar.lz
nixlib-30d70bf6058e2261048986b9db909ae291779d5c.tar.xz
nixlib-30d70bf6058e2261048986b9db909ae291779d5c.tar.zst
nixlib-30d70bf6058e2261048986b9db909ae291779d5c.zip
nixos/tests/home-assistant: replace ensureUsers with custom setup script for now
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/home-assistant.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix
index e06c52a5f41c..b7deb95b2c19 100644
--- a/nixos/tests/home-assistant.nix
+++ b/nixos/tests/home-assistant.nix
@@ -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 = {