Open domenkozar opened 1 year ago
I was thinking about this a bit also in the scope of #154
inputs:
nixpkgs:
url: nixpkgs
xxx:
url: github:myorg/myrepo
overlays:
- nixpkgs
- otherinput
pkgsets:
pkgs:
input: nixpkgs
unfree: true
mypkgs:
input: xxx
Where they could then be automatically wired from flakes using myflake.packages.${builtins.currentSystem}
or exposedPackages
attribute in devenv.nix.
Ah that example explains what you're after with this issue :+1: Makes a lot of sense.
I do think that overlays should be used (or possible to be used optionally) inside each pkgset. Maybe merging global overlays with the pkgset specific ones.
unfree: true
is not an option that nixpkgs
supports. It is allowUnfree
. Are these options sneakily renamed to allow{option}
?
What will it do in the background? import ${input} { config = { ... }; }
, because I think most flakes do not support this(?). Might not be a problem if pkgsets are mostly geared toward using nixpkgs.
Alternatively the packages.{system}
could be used, but that doesn't allow overlays :sweat_smile:.
Meh, flakes give a bit more structure/standardization, but it's still not as far as is sometimes needed.
The other option would be to overload the inputs:
inputs:
nixpkgs:
url: nixpkgs
allowUnfree: true
xxx:
url: github:myorg/myrepo
includeOverlays: true
packages: mypkgs
And then devenv.nix
option could be called output.packages
.
A bit more explicit:
inputs:
nixpkgs:
url: nixpkgs
args:
allowUnfree: true
xxx:
url: github:myorg/myrepo
outputs:
overlays: true
packages: mypkgs
It would be useful to be able to expose a package set in an environment, so that environments that import it can use a subset.
This would allow us to provide for example a set of all $lang tooling.