1{
2 lib,
3 pkgs,
4 ...
5}:
6
7{
8 name = "pretix";
9 meta.maintainers = with lib.maintainers; [ hexa ];
10
11 nodes = {
12 pretix = {
13 networking.extraHosts = ''
14 127.0.0.1 tickets.local
15 '';
16
17 services.pretix = {
18 enable = true;
19 nginx.domain = "tickets.local";
20 plugins = with pkgs.pretix.plugins; [
21 passbook
22 pages
23 ];
24 settings = {
25 pretix = {
26 instance_name = "NixOS Test";
27 url = "http://tickets.local";
28 };
29 mail.from = "hello@tickets.local";
30 };
31 };
32 };
33 };
34
35 testScript = ''
36 start_all()
37
38 pretix.wait_for_unit("pretix-web.service")
39 pretix.wait_for_unit("pretix-worker.service")
40
41 pretix.wait_until_succeeds("curl -q --fail http://tickets.local")
42
43 pretix.succeed("pretix-manage --help")
44
45 pretix.log(pretix.succeed("systemd-analyze security pretix-web.service"))
46 '';
47}