Is your feature request related to a problem? Please describe.
It's kind of annoying to keep typing nixpkgs# over and over in situations like:
$ nix shell nixpkgs#wireshark
$ nix run nixpkgs#peek
Especially considering that # is kinda hard to type.
Describe the solution you'd like
I feel like this should just work:
$ nix shell wireshark
$ nix run peek
To achieve this, I'm thinking about this scheme:
- If an
INSTALLABLE does not contain either : or # looks like an attribute name like foo.bar.baz, resolve it to some default flake, like either flake:default#foo.bar.baz or flake:nixpkgs#foo.bar.baz
- Otherwise treat it as we do now
I'm not sure if this is the intention, but I think I am going to use stuff under nixpkgs# far more than the various other flakes. When we do need other flakes, just put a # after the flake name, i.e. foo# still means flake:foo, and things like github:owner/repo still means that flake.
Describe alternatives you've considered
- Give
nixpkgs# a shorter name: Still a bit hard to type, even if it's just n#
Additional context
Is your feature request related to a problem? Please describe.
It's kind of annoying to keep typing
nixpkgs#over and over in situations like:Especially considering that
#is kinda hard to type.Describe the solution you'd like
I feel like this should just work:
To achieve this, I'm thinking about this scheme:
INSTALLABLEdoes not contain eitherlooks like an attribute name like:or#foo.bar.baz, resolve it to some default flake, like eitherflake:default#foo.bar.bazorflake:nixpkgs#foo.bar.bazI'm not sure if this is the intention, but I think I am going to use stuff under
nixpkgs#far more than the various other flakes. When we do need other flakes, just put a#after the flake name, i.e.foo#still meansflake:foo, and things likegithub:owner/repostill means that flake.Describe alternatives you've considered
nixpkgs#a shorter name: Still a bit hard to type, even if it's justn#Additional context