mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
treewide: Use nixpkgs fetchers for npins
plugins: switch from neodev to lazydev
This commit is contained in:
parent
7510ef2c13
commit
8adc4c352a
32 changed files with 700 additions and 681 deletions
|
@ -16,26 +16,32 @@ the default theme enabled. You may use other options inside `config.vim` in
|
|||
nvf.url = "github:notashelf/nvf";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, 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 {
|
||||
inherit pkgs;
|
||||
modules = [configModule];
|
||||
};
|
||||
in {
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
nvf,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
# This will make the package available as a flake output under 'packages'
|
||||
packages.${system}.my-neovim = customNeovim.neovim;
|
||||
packages.x86_64-linux.my-neovim =
|
||||
(nvf.lib.neovimConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
modules = [
|
||||
# Or move this to a separate file and add it's path here instead
|
||||
# IE: ./nvf_module.nix
|
||||
(
|
||||
{pkgs, ...}: {
|
||||
# Add any custom options (and do feel free to upstream them!)
|
||||
# options = { ... };
|
||||
config.vim = {
|
||||
theme.enable = true;
|
||||
# and more options as you see fit...
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
})
|
||||
.neovim;
|
||||
|
||||
# Example nixosConfiguration using the configured Neovim package
|
||||
nixosConfigurations = {
|
||||
|
@ -43,11 +49,13 @@ the default theme enabled. You may use other options inside `config.vim` in
|
|||
# ...
|
||||
modules = [
|
||||
# This will make wrapped neovim available in your system packages
|
||||
{environment.systemPackages = [customNeovim.neovim];}
|
||||
# Can also move this to another config file if you pass inputs/self around with specialArgs
|
||||
({pkgs, ...}: {
|
||||
environment.systemPackages = [self.packages.${pkgs.stdenv.system}.neovim];
|
||||
})
|
||||
];
|
||||
# ...
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
}```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue