Packages without options in configuration.nix

I’ll preface this by saying I’m a nix noob…

I’m trying to get package net-snmp going. There doesn’t seem to be any way to control it from configuration.nix. I can specify it as a package so it’s installed, but I can’t include any config files embedded in the configuration.nix, nor start it automatically. Is that common? The /var/log/net-snmp.log file refers to a snmpconf perl program do build a config but that wasn’t included in the package.

I’m sure I can get it going the old fashioned way, I’m just trying to do it the nix way. (also because it makes it harder to deploy a server)

1 Like

I found this article that looks like it would be a solution to my issue…for creating arbitrary files in /etc:

Now I just need to figure out how to start the daemon at boot-up and how to pass arguments to it like:
snmpd -c /etc/snmp/snmpd.conf

1 Like

This should do well:

Not having any luck. This is what I have so far, please tell me if I’m on the right track: = {
snmpd = {
description = “Net-SNMP daemon”;
wantedBy = [ “” ];
after = [ “” ];
restartIfChanged = true;

   serviceConfig = {
     User = "root";
     Group = "root";
     Restart = "always";
     ExecStart = "${}/bin/snmpd -c /etc/snmp/snmpd.conf";

}; = true;

also tried this: = “/bin/snmpd -c /etc/snmp/snmpd.conf”; = true;