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:
Alexander Nortung 2023-03-03 09:18:52 +00:00 committed by GitHub
parent 6e027c40f2
commit 2258eb8df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 133 additions and 26 deletions

View 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 .
```

View file

@ -0,0 +1,5 @@
{
plugins.bufferline = {
enable = true;
};
}

View file

@ -0,0 +1,6 @@
{
# Import all your configuration modules here
imports = [
./bufferline.nix
];
}

View 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;
};
});
}