mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-02 17:15:01 +02:00
misc: added flake template (#219)
* Added simple flake template * Added readme to template * Updated readme to show how to use the template * Formatting * removed unused file from template * Fixed template url and pkgs * Formatting
This commit is contained in:
parent
6e027c40f2
commit
2258eb8df8
9 changed files with 133 additions and 26 deletions
16
templates/simple/README.md
Normal file
16
templates/simple/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Nixvim template
|
||||
|
||||
This template gives you a good starting point for configuring nixvim standalone.
|
||||
|
||||
## Configuring
|
||||
|
||||
To start configuring, just add or modify the nix files in `./config`. If you add a new configuration file, remember to add it to the [`congig/default.nix`](./config/default.nix) file
|
||||
|
||||
## Testing your new configuration
|
||||
|
||||
To test your configuration simply run the following command
|
||||
|
||||
```
|
||||
nix run .
|
||||
```
|
||||
|
5
templates/simple/config/bufferline.nix
Normal file
5
templates/simple/config/bufferline.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
plugins.bufferline = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
6
templates/simple/config/default.nix
Normal file
6
templates/simple/config/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
# Import all your configuration modules here
|
||||
imports = [
|
||||
./bufferline.nix
|
||||
];
|
||||
}
|
39
templates/simple/flake.nix
Normal file
39
templates/simple/flake.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
description = "A nixvim configuration";
|
||||
|
||||
inputs = {
|
||||
nixvim.url = "github:pta2002/nixvim";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
nixvim,
|
||||
flake-utils,
|
||||
...
|
||||
} @ inputs: let
|
||||
nixvimLib = nixvim.lib;
|
||||
config = import ./config; # import the module directly
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
nixvim' = nixvim.legacyPackages.${system};
|
||||
nvim = nixvim'.makeNixvimWithModule {
|
||||
inherit pkgs;
|
||||
module = config;
|
||||
};
|
||||
in {
|
||||
checks = {
|
||||
# Run `nix check .` to verify that your config is not broken
|
||||
default = nixvim.lib.${system}.check.checkNvim {
|
||||
inherit nvim;
|
||||
name = "A nixvim configuration";
|
||||
};
|
||||
};
|
||||
|
||||
packages = {
|
||||
# Lets you run `nix run .` to start nixvim
|
||||
default = nvim;
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue