gabyx
November 9, 2023, 4:34pm
1
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
packages.nix
such that I can use it
environment.systemPackages = with pkgs; [
git
unstable-pkgs.neovim
]
gabyx
November 9, 2023, 5:23pm
2
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?
gabyx
November 9, 2023, 10:35pm
3
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
TLATER
November 10, 2023, 3:53am
4
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.
NobbZ
November 10, 2023, 7:38am
5
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
!
3 Likes
gabyx
November 10, 2023, 9:47am
6
Thanks alot !
@TLATER Thanks for the link! Very useful.
gabyx
November 14, 2023, 3:59pm
7
Further read with the solution is here: