blob: 03185a4b3b049ab2387df2f80f4bdf1878697830 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{ lib, ... }:
{
name = "gs1200-exporter";
meta.maintainers = with lib.maintainers; [ DerGrumpf ];
containers.machine = {
services.gs1200-exporter = {
enable = true;
address = "192.168.2.4";
passwordFile = "/run/secrets/gs1200-password";
};
systemd.tmpfiles.rules = [
"f /run/secrets/gs1200-password 0400 root root - testpassword"
];
};
testScript = ''
machine.wait_for_unit("gs1200-exporter.service")
machine.wait_for_open_port(9934)
machine.succeed("curl -f http://localhost:9934/metrics")
'';
}
|