[Nix-dev] How to configure neovim?

Rok Garbas rok at garbas.si
Sun Oct 18 19:20:51 CEST 2015


Quoting Matthias Beyer (2015-10-17 12:56:48)
> Well, I was able to build neovim with the configuration, but only in a
> nix-repl, not in the system.
> 
> Here is what I did:
> 
>     :l <nixos>
>     sysp = config.environment.systemPackages
>     systemnvim = lib.findFirst (x: lib.hasPrefix "neovim" x.name) null sysp
>     :b systemnvim.override { vimAlias = false;
>          configure = import ~/config/nixos/pkgs/vim/customization.nix { pkgs = pkgs; }; }
> 
> which results in
> 
>     this derivation produced the following outputs:
>       out -> /nix/store/db56l9gsri8mkj5ja1i0kc30niirmfgw-neovim-2015-06-09-configured
> 
> I then went to the store and executed the `nvim` binary, which gave me
> the neovim including my plugins and customizations.
> 
> 
> What I have in my system configuration:
> 
>     # neovim.nix:
> 
>     let
>       nvim = pkgs.neovim.override {
>         vimAlias = false;
>         configure = import ./vim/customization.nix { pkgs = pkgs; };
>       };
>     in [ nvim pkgs.python pkgs.ctags ]
> 
> Which I include in my `systemPackages`.
> 
>     systemPackages = foo ++ nvimpkgs ++ bar;
> 
> The `customization.nix` file in the above code snippets is the same,
> it is also the very same file I use to build my vim with
> `vim_configurable`, so no differences there.
> 
> Can someone tell me what I'm doing wrong here? As said, the
> nix-repl-example resulted in desired results, the system rebuild
> results in a plain `nvim` binary which has no plugins, no custom
> RC-file, nothing.
> 
> Help would be appreciated.
> 
> Anyways, have a nice weekend!

your snippets look ok. there must be something you're missing.

does you system nvim point to /nix/store/...-neovim-2015-06-09-configured?

what i do in my configuration:

    nixpkgs.config.packageOverrides = pkgs: {
      neovim = pkgs.neovim.override {...};
    };
    environment.systemPackages = with pkgs; {
      neovim
      ...
    };

that works for me.


--
Rok Garbas - http://www.garbas.si
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20151018/4c06416e/attachment.bin 


More information about the nix-dev mailing list