nixpkgs.buildPlatform
Specifies the platform on which Nixvim should be built. By default, Nixvim is built on the system where it runs, but you can change where it’s built. Setting this option will cause Nixvim to be cross-compiled.
Ignored when nixpkgs.pkgs
is set.
Type: string or (attribute set)
Default:
Inherited from the “host” configuration’s pkgs
.
Or config.nixpkgs.hostPlatform
when building a standalone nixvim.
Example:
{
system = "x86_64-linux";
}
Declared by:
nixpkgs.config
Global configuration for Nixpkgs. The complete list of Nixpkgs configuration options is in the Nixpkgs manual section on global configuration.
Ignored when nixpkgs.pkgs
is set.
Type: nixpkgs config
Default:
{ }
Example:
{
allowBroken = true;
allowUnfree = true;
}
Declared by:
nixpkgs.hostPlatform
Specifies the platform where the Nixvim configuration will run.
To cross-compile, also set nixpkgs.buildPlatform
.
Ignored when nixpkgs.pkgs
is set.
Type: string or (attribute set)
Default:
- Inherited from the “host” configuration’s
pkgs
- Or
evalNixvim
’ssystem
argument - Otherwise, must be specified manually
Example:
{
system = "aarch64-linux";
}
Declared by:
nixpkgs.overlays
List of overlays to apply to Nixpkgs.
This option allows modifying the Nixpkgs package set accessed through the pkgs
module argument.
For details, see the Overlays chapter in the Nixpkgs manual.
If the nixpkgs.pkgs
option is set, overlays specified using nixpkgs.overlays
will be applied after the overlays that were already included in nixpkgs.pkgs
.
Type: list of (nixpkgs overlay)
Default:
[ ]
Example:
[
# Add a vim plugin that isn't packaged in nixpkgs
(final: prev: {
easygrep = final.vimUtils.buildVimPlugin {
name = "vim-easygrep";
src = final.fetchFromGitHub {
owner = "dkprice";
repo = "vim-easygrep";
rev = "d0c36a77cc63c22648e792796b1815b44164653a";
hash = "sha256-bL33/S+caNmEYGcMLNCanFZyEYUOUmSsedCVBn4tV3g=";
};
};
})
# Override neovim-unwrapped with one from a flake input
# Using `stdenv.hostPlatform` to access `system`
(final: prev: {
neovim-unwrapped =
inputs.neovim-nightly-overlay.packages.${final.stdenv.hostPlatform.system}.default;
})
# Override neovim-unwrapped to tweak its desktop entry
(final: prev: {
neovim-unwrapped = prev.neovim-unwrapped.overrideAttrs (old: {
postInstall = old.postInstall or "" + ''
substituteInPlace $out/share/applications/nvim.desktop \
--replace "TryExec=nvim" "" \
--replace "Terminal=true" "Terminal=false" \
--replace "Exec=nvim %F" "Exec=kitty -e nvim %F"
'';
});
})
]
Declared by:
nixpkgs.pkgs
If set, the pkgs
argument to all Nixvim modules is the value of this option.
If unset, the pkgs
argument is determined by importing nixpkgs.source
.
This option can be used by external applications to increase the performance of evaluation,
or to create packages that depend on a container that should be built with the exact same
evaluation of Nixpkgs, for example.
Applications like this should set their default value using lib.mkDefault
,
so user-provided configuration can override it without using lib
.
E.g. Nixvim’s home-manager module can re-use the pkgs
instance from the “host” modules.
caution
Changing this option can lead to issues that may be difficult to debug.
Type: An evaluation of Nixpkgs; the top level attribute set of packages
Example:
import <nixpkgs> { }
Declared by:
nixpkgs.source
The path to import Nixpkgs from.
Ignored when nixpkgs.pkgs
is set.
caution
Changing this option can lead to issues that may be difficult to debug.
Type: path
Default:
Nixvim’s flake input.nixpkgs
Declared by: