How to use unstable package set inside `configuration.nix`

I am trying to install neovim from the nixpkgs-unstable.url = "github:nixos/nixpkgs-channels/nixos-unstable"
in my NixOs setup with flake.nix.

How do I inject the input.nixpkgs-unstable through to configuration.nix and then to
such that I can use it

 environment.systemPackages = with pkgs; [

I managed to do the above, but
when I rebuild the system the neovim package is not the updated version 0.9.4. apparently the above does not work?

Why is that?

I think the above worked, I had a impure nix-env -e neovim to do (was installed in my user profile)
which overrid the newer neovim.

I solved it better by using a template now from nixos-starter-config

1 Like

You’ve obviously solved it, but for future readers, here’s @NobbZ blog post on the various strategies for this: Getting inputs to modules in a nix-flake | NobbZ' Blog

And yes, if you’ve ever used nix-env or nix profile, double check they’re not getting in the way.

Please do not use github:nixos/nixpkgs-channels! This repository only exist for historical reasons, and doesn’t receive any updates since 3 years or so.

If you want to have a nixpkgs flake input use github:nixos/nixpkgs!


Thanks alot !

@TLATER Thanks for the link! Very useful.

Further read with the solution is here: