1{ lib, pkgs, ... }:
2{
3 name = "redlib";
4 meta.maintainers = with lib.maintainers; [
5 bpeetz
6 Guanran928
7 ];
8
9 nodes.machine = {
10 services.redlib = {
11 package = pkgs.redlib;
12 enable = true;
13 # Test CAP_NET_BIND_SERVICE
14 port = 80;
15
16 settings = {
17 REDLIB_DEFAULT_USE_HLS = true;
18 };
19 };
20 };
21
22 testScript = ''
23 machine.wait_for_unit("redlib.service")
24 machine.wait_for_open_port(80)
25 # Query a page that does not require Internet access
26 machine.succeed("curl --fail http://localhost:80/settings")
27 machine.succeed("curl --fail http://localhost:80/info | grep '<tr><td>Use HLS</td><td>on</td></tr>'")
28 '';
29}