anyrun-org / anyrun

A wayland native, highly customizable runner.
GNU General Public License v3.0
560 stars 44 forks source link

Nix: Add overlay #159

Closed lordkekz closed 1 month ago

lordkekz commented 1 month ago

Hi, I just discovered anyrun a few days ago. I noticed that your flake doesn't provide an overlay with the packages.

Overlays make it possible to "merge" some packages into the main nixpkgs channel when writing your configuration, so it's easier to access them. By using overlays, the files that use anyrun packages won't need to do inputs.anyrun.packages.${system}.<name> but rather pkgs.<name> (or pkgs.anyrunPlugins.<name>).

In this PR I added a nixpkgs overlay for the packages from the anyrun flake. I chose to put the plugins in a nested attribute set to avoid conflicts and make it easier to list them, e.g. in nix repl. I also updated the sample in README.md (and the git repo reference, fixes #145 ).

Let me know if I should change something :)

NotAShelf commented 1 month ago

This is not necessary. The flake uses flake-parts, so it'd be a better approach to use the easy-overlay module for flake-parts and use overlayAttrs to generate to overlay.

NotAShelf commented 1 month ago

See #160