mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-25 06:36:46 +00:00
ea7469f1c8
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
1.7 KiB
1.7 KiB
Standalone Installation on Home-Manager
Your built Neovim configuration can be exposed as a flake output to make it easier to share across machines, repositories and so on. Or it can be added to your system packages to make it available across your system.
The following is an example installation of nvf
as a standalone package with
the default theme enabled. You may use other options inside config.vim
in
configModule
, but this example will not cover that.
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
nvf.url = "github:notashelf/nvf";
};
outputs = {nixpkgs, home-manager, nvf, ...}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
configModule = {
# Add any custom options (and do feel free to upstream them!)
# options = { ... };
config.vim = {
theme.enable = true;
# and more options as you see fit...
};
};
customNeovim = nvf.lib.neovimConfiguration {
modules = [configModule];
inherit pkgs;
};
in {
# this will make the package available as a flake input
packages.${system}.my-neovim = customNeovim.neovim;
# this is an example home-manager configuration
# using the built neovim package
homeConfigurations = {
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
# ...
modules = [
./home.nix
# this will make wrapped neovim available in your system packages
{environment.systemPackages = [customNeovim.neovim];}
];
# ...
};
};
};
}