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 virtualisation.memorySize = 2048; 14 15 networking.extraHosts = '' 16 127.0.0.1 tickets.local 17 ''; 18 19 services.pretix = { 20 enable = true; 21 nginx.domain = "tickets.local"; 22 plugins = with pkgs.pretix.plugins; [ 23 passbook 24 pages 25 zugferd 26 ]; 27 settings = { 28 pretix = { 29 instance_name = "NixOS Test"; 30 url = "http://tickets.local"; 31 }; 32 mail.from = "hello@tickets.local"; 33 }; 34 }; 35 }; 36 }; 37 38 testScript = '' 39 start_all() 40 41 pretix.wait_for_unit("pretix-web.service") 42 pretix.wait_for_unit("pretix-worker.service") 43 44 pretix.wait_until_succeeds("curl -q --fail http://tickets.local") 45 46 pretix.succeed("pretix-manage --help") 47 48 pretix.log(pretix.succeed("systemd-analyze security pretix-web.service")) 49 ''; 50}