What is nix-wrapper-modules and when to use it
mainnix-wrapper-modules is a Nix library designed to create wrapped executables using the Nix module system.
Instead of manually writing shell scripts with pkgs.writeShellScriptBin or complex pkgs.symlinkJoin derivations to wrap programs with specific configurations (like custom config files or environment variables), this library allows you to define these wrappers as portable Nix modules.
Use this library when:
- You want to create a portable derivation of a program with specific settings (e.g., a specific shell for Alacritty).
- You want to avoid the overhead of pulling in entire NixOS or Home Manager configurations just to use a few configured tools.
- You need a consistent, flexible way to wrap packages that remains overrideable via the module system.
- You want to replace standard packages with wrapped versions in an overlay without losing the ability to use
.overrideor.overrideAttrs.