Skip to content

Commit

Permalink
pkgs: add nixvimWithOptions (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcel <[email protected]>
  • Loading branch information
SuperSandro2000 and MarcelCoding authored Jun 28, 2024
1 parent 6550c6e commit 46872d0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ inputs = {
{
imports = [ inputs.nvim.nixosModules.nvim ];
# See <https://nix-community.github.io/nixvim/NeovimOptions/index.html>
# for availabe options.
programs.nixvim.enable = true;
}
```
Expand All @@ -41,6 +43,8 @@ inputs = {
{
imports = [ inputs.nvim.homeManagerModules.nvim ];
# See <https://nix-community.github.io/nixvim/NeovimOptions/index.html>
# for availabe options.
programs.nixvim.enable = true;
}
```
Expand All @@ -52,3 +56,16 @@ inputs = {
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nixvim ];
}
```

```nix
{
environment.systemPackages = [
(inputs.nvim.packages.x86_64-linux.nixvimWithOptions {
inherit pkgs;
# See <https://nix-community.github.io/nixvim/NeovimOptions/index.html>
# for availabe options.
options.enableMan = false;
})
];
}
```
7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,18 @@
};
} // flake-utils.lib.eachDefaultSystem (system: {
packages = {
nixvim = nixvim.legacyPackages.${system}.makeNixvimWithModule {
nixvimWithOptions = { pkgs, options ? { } } : nixvim.legacyPackages.${system}.makeNixvimWithModule {
module = { config, lib, pkgs, ... }: {
imports = [
(mkLsp { inherit config lib pkgs; } (angularLsp { inherit pkgs; }))
./modules
options
];
};
inherit pkgs;
};

nixvim = self.packages.${system}.nixvimWithOptions {
inherit (nixpkgs.legacyPackages.${system}) pkgs;
};

Expand Down

0 comments on commit 46872d0

Please sign in to comment.