tmux-which-key icon indicating copy to clipboard operation
tmux-which-key copied to clipboard

feat: adds flake.nix with home manager support

Open higherorderfunctor opened this issue 7 months ago • 1 comments

Removes the original example Nix configuration I had contributed and adds a flake.nix to the repo with more thorough installation steps. A flake.nix in the repository allows Nix users to install directly from GitHub.

This is in response to the new comments on https://github.com/alexwforsythe/tmux-which-key/issues/2#issuecomment-2192905818.

The following files are added:

  • flake.nix - Entry point that the Nix package manager looks for when installing from GitHub.
  • flake.lock - Nix is declarative and enforces pinned dependencies. This shouldn't need to be updated very often if at all. The only dependency is on nixpkgs and the instructions have the user override it with whatever version they use.
  • nix/default.nix - Creates the Nix plugin package.
  • nix/generate-config.nix - Helper to convert YAML configurations into a Nix source file.
  • nix/home-manager.nix - Nix is typically focused on system configurations whereas home manager focuses on per-user configurations. This adds options the user can use to install and configure the plugin with Nix expressions. It handles converting Nix expressions back into a YAML configuration and running build.py to produce the final tmux configuration.

I updated README.md by removing the old example and put in more thorough examples using the flake.nix. I also corrected a few linting errors for indented code blocks under a list and HTML elements.

I'm also happy to be a CODEOWNER for these files to keep them maintained if wished. If you want me to add, just let me know!

higherorderfunctor avatar Jun 30 '24 21:06 higherorderfunctor