1import ./make-test-python.nix (
2 { lib, pkgs, ... }:
3 {
4 name = "photoprism";
5 meta.maintainers = with lib.maintainers; [ stunkymonkey ];
6
7 nodes.machine =
8 { pkgs, ... }:
9 {
10 services.photoprism = {
11 enable = true;
12 port = 8080;
13 originalsPath = "/media/photos/";
14 passwordFile = pkgs.writeText "password" "secret";
15 };
16 environment.extraInit = ''
17 mkdir -p /media/photos
18 '';
19 };
20
21 testScript = ''
22 machine.wait_for_unit("multi-user.target")
23 machine.wait_for_open_port(8080)
24 response = machine.succeed("curl -vvv -s -H 'Host: photoprism' http://127.0.0.1:8080/library/login")
25 assert '<title>PhotoPrism</title>' in response, "Login page didn't load successfully"
26 '';
27 }
28)