Review of my first nixos overlay package: check_mk_agent

I’m still new to NixOS, but created a working Package that uses a overlay.

I wanted to create a package that can be imported with a single import line, but be able to configure a systemd service, and that’s what I came up with: github.com/BenediktSeidl/nixos-check_mk_agent-overlay/
The Package itself is a shell script that can be further enriched by plugins which can be other shell scripts or python scripts. Until now only two plugins are implemented, but more could follow.

Is this the correct way to do it? How can the Package be improved? What best practice have I ignored? Where can I find more Information about writing Packages that are not part of the NixOS distribution?

Thanks in advanced, Benedikt

3 Likes

I know this is an old thread and I don’t really have answers to your questions, other than it looks decent at a glance, but did you consider submitting a PR to nixpkgs for the derivation and the module?

I am in a situation in which I would like to have a checkmk agent running on a NixOS system as well and it would be great to just have it as part of nixpkgs.

You would probably get good feedback as part of the PR review process as well.

1 Like