summaryrefslogtreecommitdiffstats
path: root/nixos/tests/web-apps/immich-kiosk.nix
blob: 0679d78b636de620d9947063bcfa33a6a8fa7458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ ... }:
{
  name = "immich-kiosk";

  nodes.machine =
    { pkgs, ... }:
    {
      environment.systemPackages = [ pkgs.jq ];

      services.immich-kiosk = {
        enable = true;
        settings = {
          immich_url = "http://localhost:2283";
          immich_api_key = {
            _secret = pkgs.writeText "immich-kiosk-api-key" "dummy-api-key";
          };
          kiosk = {
            port = 3100;
            demo_mode = true;
          };
        };
      };
    };

  testScript = ''
    machine.wait_for_unit("immich-kiosk.service")
    machine.wait_for_open_port(3100)
    machine.succeed("pgrep -x immich-kiosk")
    machine.succeed("jq -r .immich_api_key /run/immich-kiosk/config.yaml | grep dummy-api-key")
  '';
}