1{ lib, ... }:
2
3{
4 name = "glances";
5
6 nodes = {
7 machine_default =
8 { pkgs, ... }:
9 {
10 services.glances = {
11 enable = true;
12 };
13 };
14
15 machine_custom_port =
16 { pkgs, ... }:
17 {
18 services.glances = {
19 enable = true;
20 port = 5678;
21 };
22 };
23 };
24
25 testScript = ''
26 machine_default.start()
27 machine_default.wait_for_unit("glances.service")
28 machine_default.wait_for_open_port(61208)
29
30 machine_custom_port.start()
31 machine_custom_port.wait_for_unit("glances.service")
32 machine_custom_port.wait_for_open_port(5678)
33 '';
34
35 meta.maintainers = [ lib.maintainers.claha ];
36}