helix icon indicating copy to clipboard operation
helix copied to clipboard

Expose an overlay in `flake.nix`

Open leungbk opened this issue 3 years ago • 3 comments

It would be nice if the flake.nix exposed an overlay defining the bleeding-edge helix. This would permit clean composition into a personal configuration without otherwise changing existing Helix-related configuration.

Example: https://github.com/oxalica/nil/commit/4c77fa90ef238f81c2c801db66b1d56140551ecc

leungbk avatar Oct 18 '22 11:10 leungbk

i am not quite sure if i understand it correct, but: by adding github.com:helix-editor/helix/master as a flake input, you could essentially overwrite the package in the home-manager options for helix like so:

{ helix-master, pkgs, ... }:

programs.helix = {
	enable = true;
	package = helix-master.packages."x86_64-linux".default;
	# your config here: ...
};

at least that's how i do it (well sort of) i have a personal forked branch which adds some open pull requests. :)

This may or may not be a proper way of doing it, but at least by doing that you have access to the 'bleeding edge' :)

SoraTenshi avatar Oct 20 '22 18:10 SoraTenshi

Your way is good too, it's just that if my proposed change is implemented, the end user has an even easier time of it, by simply adding the overlay into their flake.nix without having to additionally drill the helix flake input into their home.nix.

leungbk avatar Oct 20 '22 22:10 leungbk

Couldn't you just trivially define your own overlay?

From my config:

final: prev: { inherit (flakes.helix.packages.${system}) helix; }

oati avatar Oct 25 '22 02:10 oati