initial commit

This commit is contained in:
Osman Faruk Bayram 2024-12-14 01:37:21 +03:00
commit c8383eac8d
4 changed files with 74 additions and 0 deletions

17
README.md Normal file
View file

@ -0,0 +1,17 @@
# 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
[`config/default.nix`](./config/default.nix) file
## Testing your new configuration
To test your configuration simply run the following command
```
nix run .
```

6
config/bufferline.nix Normal file
View file

@ -0,0 +1,6 @@
{
plugins = {
bufferline.enable = true;
web-devicons.enable = true;
};
}

4
config/default.nix Normal file
View file

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

47
flake.nix Normal file
View file

@ -0,0 +1,47 @@
{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixvim.url = "github:nix-community/nixvim";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
{ nixvim, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ pkgs, system, ... }:
let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = {
inherit pkgs;
module = import ./config; # import the module directly
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
# inherit (inputs) foo;
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in
{
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
};
packages = {
# Lets you run `nix run .` to start nixvim
default = nvim;
};
};
};
}