Talk:Neovim: Difference between revisions

From NixOS Wiki
imported>MikulasVanousek
How to install packages from nixpkgs in config?
 
imported>MikulasVanousek
No edit summary
Line 1: Line 1:
I inclued nvim amongst the packages I install in my NixOS config:
I inclued nvim amongst the packages I install in my NixOS config:


{ config, pkgs, ... }:
  { config, pkgs, ... }:


{
  {
  nixpkgs.config.allowUnfree = true;
    nixpkgs.config.allowUnfree = true;
  system.autoUpgrade.channel = https://nixos.org/channels/nixpkgs-unstable;
    system.autoUpgrade.channel = https://nixos.org/channels/nixpkgs-unstable;


  environment.systemPackages = with pkgs; [
    environment.systemPackages = with pkgs; [
     neovim
     neovim
     firefox
     firefox
Line 28: Line 28:
    
    
   environment.variables.EDITOR = "nvim";  
   environment.variables.EDITOR = "nvim";  
}
  }


This istalls the nixos.neovim version of the package, which has version 4.4. I need version 5.1, which can be found in nixpkgs.neovim. I can install it with:
This istalls the nixos.neovim version of the package, which has version 4.4. I need version 5.1, which can be found in nixpkgs.neovim. I can install it with:
nix-env -iA nixpkgs.neovim
  nix-env -iA nixpkgs.neovim


Is there a way to install it form my config?
Is there a way to install it form my config?

Revision as of 20:13, 14 November 2021

I inclued nvim amongst the packages I install in my NixOS config:

 { config, pkgs, ... }:
 {
   nixpkgs.config.allowUnfree = true;
   system.autoUpgrade.channel = https://nixos.org/channels/nixpkgs-unstable;
   environment.systemPackages = with pkgs; [
   neovim
   firefox
   anki
   
   ulauncher
   tdesktop
   discord
   git
   python
   ruby
   neofetch
   starship
   terminus-nerdfont
   xclip
 ];
 
 environment.variables.EDITOR = "nvim"; 
 }

This istalls the nixos.neovim version of the package, which has version 4.4. I need version 5.1, which can be found in nixpkgs.neovim. I can install it with:

 nix-env -iA nixpkgs.neovim

Is there a way to install it form my config?