Unverified Commit 163a50a5 authored by K900's avatar K900 Committed by Martin Weinelt
Browse files

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

(cherry picked from commit 30d70bf6)
parent 5bc5fcbf
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -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 = {