BenediktSeidl / nixos-check_mk_agent-overlay

MIT License
8 stars 4 forks source link

How to include this module correctly? #4

Open RafaelKr opened 1 month ago

RafaelKr commented 1 month ago

Hi, thanks for providing this helpful module!

For me it's somehow not enough to follow the "How to add". I added the module to my flake as described but it results in

error: attribute 'check_mk_agent' missing
       at /nix/store/ygsprbfdnf27gi7lfn5n7hsavx9x0s5n-source/hosts/example/host1.example.com/monitoring.nix:19:17:
           18|       openFirewall = false;
           19|       package = pkgs.check_mk_agent.override { enablePluginSmart = true; };
             |                 ^
           20|     };

Maybe it's related to that I also have other overlays configured?

I can work around it by adding this to my overlays:

check_mk_agent = final: prev: {
  check_mk_agent = prev.callPackage (
    builtins.toPath inputs.check_mk_agent.outPath + "/pkgs/check_mk_agent/default.nix"
  ) { };
};
BenediktSeidl commented 1 month ago

Cool to hear that someone is interested in using this code.

Sadly I'm not a nixos expert, so I'm not 100% sure whats going wrong. I did some research and found flake-parts that could be used to rewrite this flake, and maybe remove some quirks that I introduced.

Do you know of other (trusted) flakes, that could be used as a blueprint for the check_mk_agent flake?