Stable and unstable nixpkgs #628
|
Just read through the core principles. Is there a recommended way of mixing packages from stable and unstable? |
Replies: 2 comments
|
I'm thinking about this guide in flake.parts. Is it still the way with den or is there some better alternative? |
|
There are a number of ways to do this, including with den... I, personally, just run unstable but I have support in my config to specify separate channels in my host-schema with instantiate overrides to switch between nixos-stable, nixos-unstable, and nixpkgs-master on the hosts themselves. You can use pkg overlays to expose unstable packages to stable systems: unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (final.stdenv.hostPlatform) system;
config.allowUnfree = true;
};
};Alternatively, you could use a policy.resolve to project a custom-pkgs object from the outer flake/den context into a class; but that's probably overkill for what you need. I do have a future vision with per-aspect pkg overrides as a first class pattern, but the reality is users probably don't need that -- overrides can solve this for 99% of user use cases. |
There are a number of ways to do this, including with den...
I, personally, just run unstable but I have support in my config to specify separate channels in my host-schema with instantiate overrides to switch between nixos-stable, nixos-unstable, and nixpkgs-master on the hosts themselves.
You can use pkg overlays to expose unstable packages to stable systems:
Alternatively, you could use a policy.resolve to project a custom-pkgs object from the outer flake/den context into a class; but that's probably overkil…