mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
24 lines
451 B
Nix
24 lines
451 B
Nix
|
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||
|
name = "snmpd";
|
||
|
|
||
|
nodes.snmpd = {
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
net-snmp
|
||
|
];
|
||
|
|
||
|
services.snmpd = {
|
||
|
enable = true;
|
||
|
configText = ''
|
||
|
rocommunity public
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
testScript = ''
|
||
|
start_all();
|
||
|
machine.wait_for_unit("snmpd.service")
|
||
|
machine.succeed("snmpwalk -v 2c -c public localhost | grep SNMPv2-MIB::sysName.0");
|
||
|
'';
|
||
|
|
||
|
})
|