1{ pkgs, lib, ... }:
2let
3 port = 6000;
4in
5{
6 name = "ddns-updater";
7
8 meta.maintainers = with lib.maintainers; [ delliott ];
9
10 nodes.machine =
11 { pkgs, ... }:
12 {
13 services.ddns-updater = {
14 enable = true;
15 environment = {
16 LISTENING_ADDRESS = ":" + (toString port);
17 };
18 };
19 };
20
21 testScript = ''
22 machine.wait_for_unit("ddns-updater.service")
23 machine.wait_for_open_port(${toString port})
24 machine.succeed("curl --fail http://localhost:${toString port}/")
25 '';
26}