Home-manager & helix editor: install helix using flake

I’m very new to flakes. Using home-manager installed as standalone and Helix editor as home-manager module:

programs.helix = {
  enable = true;
  # other config options
}

I’m not very happy with how Helix handles releases though and if I want to use “latest” patches, the upstream-provided flake must be used because upstream does not support any other approach.

I’ve read a^ few^ threads^ but all I found either assumes I’m using flakes to deploy home-manager itself (which I don’t yet) or, I must admin, I don’t really understand.

My question is: How do I install Helix from the upstream flake while keeping home-manager-managed config?

Any tips and nudges welcome!

all I found either assumes I’m using flakes to deploy home-manager itself

I guess getting your homeManagerConfiguration from a flake might be a good intermediate step. Since you want to use the Helix upstream flake, I’d say that would be the way to approach it.

I guess getting your homeManagerConfiguration from a flake might be a good intermediate step.

I was hoping to avoid this, I don’t feel I’m ready to do that step yet as I don’t think I fully understand the consequences of it. But it looks like I’m gonna have to anyway so I might just give it a try in the coming weeks. Thanks!

If you want to ingest the helix flake the usual way I suppose you have to ingest it in a flake. But if your system is already on a flakes-based config, adding home-manager to that flake is not that difficult to do.

The only other approach I could think of is overriding the helix derivation to use the current master branch from GitHub instead of the releases. Because at the end of the day, it is building from source anyways.

However unless you bring your own cache somehow, in both case I guess you’d have to build Helix from source yourself. So that might take a while.

you should be able to do this with (builtins.getFlake "github:helix-editor/helix").packages.${pkgs.system}.default

This is exactly what I was looking for. Thanks!

It’s a great stop-gap solution before I venture deeper into flakes territoriy.