mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
37 lines
675 B
Nix
37 lines
675 B
Nix
{ lib, ... }:
|
|
|
|
{
|
|
name = "glances";
|
|
|
|
nodes = {
|
|
machine_default =
|
|
{ pkgs, ... }:
|
|
{
|
|
services.glances = {
|
|
enable = true;
|
|
};
|
|
};
|
|
|
|
machine_custom_port =
|
|
{ pkgs, ... }:
|
|
{
|
|
services.glances = {
|
|
enable = true;
|
|
port = 5678;
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
machine_default.start()
|
|
machine_default.wait_for_unit("glances.service")
|
|
machine_default.wait_for_open_port(61208)
|
|
|
|
machine_custom_port.start()
|
|
machine_custom_port.wait_for_unit("glances.service")
|
|
machine_custom_port.wait_for_open_port(5678)
|
|
'';
|
|
|
|
meta.maintainers = [ lib.maintainers.claha ];
|
|
}
|