1{ pkgs, lib, ... }:
2{
3 name = "snmpd";
4
5 nodes.snmpd = {
6 environment.systemPackages = with pkgs; [
7 net-snmp
8 ];
9
10 services.snmpd = {
11 enable = true;
12 configText = ''
13 rocommunity public
14 '';
15 };
16 };
17
18 testScript = ''
19 start_all();
20 machine.wait_for_unit("snmpd.service")
21 machine.succeed("snmpwalk -v 2c -c public localhost | grep SNMPv2-MIB::sysName.0");
22 '';
23
24}