How to use both unstable-nixpkgs and stable-nixpkgs in your flake.nix and configuration.nix
How to use both unstable-nixpkgs and stable-nixpkgs in your flake.nix and configuration.nix - Infosec.Pub
I had an issue with building so I decided to move one package from the unstable repo to the 25.11 repo. My default channel is unstable so this guide adds the 25.11 repo into my flake and configuration. It can easily be substituted if you’re running stable as the default pkgs and want some unstable-pkgs. 1. add the url to your flake inputs inputs = { stable-nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; ... } 2. update the arguments in the outputs function to include the new variable outputs = { self, nixpkgs, stable-nixpkgs, ... }@inputs: { ... } 3. import the repo into your configuration.nix { config, pkgs, inputs, lib, ... }: let pkgs-stable = import inputs.stable-nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; }; in { ... } 4. Add the package you want from this repo enrionment.systemPackages = [ pkgs.vim pkgs-stable.heroic ]
