summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-11-04 12:23:31 +0300
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-11-04 22:11:34 +0100
commit163a50a5e1b210f16b81aab52e5053d693fdd200 (patch)
tree61326578e710675f6ab5f2a25d1a4db34ef128aa /nixos/tests
parent5bc5fcbf4b2338342aa68c39a7e3588ebb1e7f97 (diff)
downloadnixpkgs-163a50a5e1b210f16b81aab52e5053d693fdd200.tar
nixpkgs-163a50a5e1b210f16b81aab52e5053d693fdd200.tar.gz
nixpkgs-163a50a5e1b210f16b81aab52e5053d693fdd200.tar.bz2
nixpkgs-163a50a5e1b210f16b81aab52e5053d693fdd200.tar.lz
nixpkgs-163a50a5e1b210f16b81aab52e5053d693fdd200.tar.xz
nixpkgs-163a50a5e1b210f16b81aab52e5053d693fdd200.tar.zst
nixpkgs-163a50a5e1b210f16b81aab52e5053d693fdd200.zip
nixos/tests/home-assistant: replace ensureUsers with custom setup script for now
(cherry picked from commit 30d70bf6058e2261048986b9db909ae291779d5c)
Diffstat (limited to 'nixos/tests')
-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 e06c52a5f41..b7deb95b2c1 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 = {