-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
65 lines (55 loc) · 1.59 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
description = "Next generation neovim configuration framework";
inputs = {
flake-utils.url = github:numtide/flake-utils;
nixpkgs.url = github:NixOS/nixpkgs;
};
outputs = { self, flake-utils, nixpkgs }:
let
dsl = import ./lib/dsl.nix { inherit (nixpkgs) lib; };
overlay = final: _: {
nix2luaUtils = final.callPackage ./lib/utils.nix { inherit nixpkgs; };
neovimBuilder = import ./lib/neovim-builder.nix {
pkgs = final;
lib = final.lib;
};
nix2vimDemo = final.neovimBuilder {
imports = [
./modules/nvchad.nix
./modules/essentials.nix
./modules/git.nix
./modules/lsp.nix
./modules/nvim-tree.nix
./modules/treesitter.nix
./modules/telescope.nix
./modules/which-key.nix
./modules/ai.nix
];
enableViAlias = true;
enableVimAlias = true;
};
};
in
{
inherit overlay;
lib.dsl = dsl;
templates.default = {
path = ./template;
description = "A very basic neovim configuration";
};
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ overlay ];
};
in
{
packages.default = pkgs.nix2vimDemo;
apps = import ./apps.nix { inherit pkgs; utils = flake-utils.lib; };
checks = import ./checks { inherit pkgs dsl; check-utils = import ./check-utils.nix; };
}
);
}