-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support multiple instances of nixpkgs #22
Comments
or, use multiple nixpkgs? For instance, I like my OS nixpkgs to be pinned to the current nixos-release tag, but use certain applications from the unstable, or even trunk... |
The current workaround is to create a { inputs, pkgs, .... }:
{
_module.args.pkgsUnstable = import inputs.nixpkgs-unstable {
inherit (pkgs) system;
config.allowUnfree = true;
};
} Then import it in whatever module needs it: { flake, pkgsUnstable, ... }:
{
# Import to add the pkgsUnstable argument
imports = [ flake.modules.common.nixpkgs-unstable ];
# Pull the package from pkgsUnstable
services.myservice.package = pkgsUnstable.myservice;
} |
Do you have a plan for the "api" you'd like to expose here, @zimbatm? In other words, how would people specify which instance of nixpkgs to use for each host? I personally like being able to patch nixpkgs (example here) before using it to define my nixosConfigurations. It would be quite cool if whatever API we design here would allow for something like that. I'd be interested in trying to implement this if you're open to a PR. |
Not super precisely. There is a need for patching/overriding inputs. For this, we could add Then, there is a need to map a nixpkgs input to a host. We have |
At the moment, only the "nixpkgs" input is used to:
Some users might want to use different versions of nixpkgs for different machines (eg: stable and unstable)
The text was updated successfully, but these errors were encountered: