[Nix-dev] How do I change vim compile options from my configuration.nix?

joachifm at fastmail.fm joachifm at fastmail.fm
Wed Nov 25 19:01:42 CET 2015


On Wed, Nov 25, 2015, at 06:36 PM, Anders Lundstedt wrote:
> On Wed, Nov 25, 2015 at 6:22 PM,  <joachifm at fastmail.fm> wrote:
> > One way to achieve this is via ~/.nixpkgs/config.nix. Vim happens to
> > have a configurable variant. Something like (untested)
> > ```nix
> > {
> >   vim.python3 = true;
> > }
> > ```
> 
> I do not have a ~/.nixpkgs/config.nix. I created one with those three
> lines but that did not help. I then tried to put the line "vim.python3
> = true;" in my configuration.nix, which gave the following error when
> doing "nix-rebuild --switch":
> 
> error: The option `vim' defined in `/path/to/configuration.nix' does not
> exist.

That is not what I suggested you do. If you want to use
`configuration.nix`, you must use the option `nixpkgs.config`.

What I had in mind was the following sequence (assuming you start
without ~/.nixpkgs):

```sh
mkdir ~/.nixpkgs
echo '{ vim.python3 = true; }' > ~/.nixpkgs/config.nix
nix-env -iA nixos.vim_configurable
vim --version | grep python3
```


More information about the nix-dev mailing list