Providing links for flake references like url = "github:zhaofengli/nix-homebrew"; is really convenient — would it be possible to resolve registry flakes as well? For example, I have some pinned entries that would be nice to link to:
inputs = {
nixpkgs.url = "flake:nixpkgs/nixos-24.05";
nixos-unstable.url = "flake:nixpkgs/nixos-unstable";
nixpkgs-darwin.url = "flake:nixpkgs/nixpkgs-24.05-darwin";
nixpkgs-unstable.url = "flake:nixpkgs/nixpkgs-unstable";
nix-homebrew = {
url = "github:zhaofengli/nix-homebrew"; # <-- This one becomes a link, awesome!
inputs.nixpkgs.follows = "nixpkgs-darwin";
inputs.nix-darwin.follows = "nix-darwin";
};
}
These ultimately resolve to github: flake refs:
$ nix registry list | grep -E 'nixpkgs|darwin'
user flake:nixpkgs github:NixOS/nixpkgs/c3392ad349a5227f4a3464dce87bcc5046692fce
global flake:nix-darwin github:LnL7/nix-darwin
global flake:nixpkgs github:NixOS/nixpkgs/nixpkgs-unstable
I am guessing that some metadata about these are already evaluated at some point, since go-to-definition works on their store paths, so maybe it's just a matter of plumbing through a bit of extra metadata somewhere? Thanks!
Providing links for flake references like
url = "github:zhaofengli/nix-homebrew";is really convenient — would it be possible to resolve registry flakes as well? For example, I have some pinned entries that would be nice to link to:These ultimately resolve to
github:flake refs:I am guessing that some metadata about these are already evaluated at some point, since go-to-definition works on their store paths, so maybe it's just a matter of plumbing through a bit of extra metadata somewhere? Thanks!