-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
100 lines (97 loc) · 2.92 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
systems.url = "github:nix-systems/default";
flake-parts.url = "github:hercules-ci/flake-parts";
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
denops-vim = {
url = "github:vim-denops/denops.vim";
flake = false;
};
ddc-vim = {
url = "github:Shougo/ddc.vim";
flake = false;
};
ddc-ui-native = {
url = "github:Shougo/ddc-ui-native";
flake = false;
};
ddc-source-around = {
url = "github:Shougo/ddc-source-around";
flake = false;
};
ddc-filter-matcher_head = {
url = "github:Shougo/ddc-filter-matcher_head";
flake = false;
};
ddc-filter-sorter_rank = {
url = "github:Shougo/ddc-filter-sorter_rank";
flake = false;
};
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (_: {
systems = import inputs.systems;
perSystem =
{
self',
system,
pkgs,
lib,
...
}:
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = with inputs; [ neorg-overlay.overlays.default ] ++ (import ./nix/overlay.nix inputs);
};
checks = {
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt-rfc-style.enable = true;
statix.enable = true;
deadnix.enable = true;
luacheck = {
enable = true;
excludes = [ "lua/ddc_source_neorg/.*\\.lua" ];
};
stylua = {
enable = true;
excludes = [ "lua/ddc_source_neorg/.*\\.lua" ];
};
denofmt.enable = true;
denolint.enable = true;
fnlfmt = {
enable = true;
name = "fnlfmt";
entry = "${pkgs.fnlfmt}/bin/fnlfmt";
files = "\\.fnl$";
};
vint = {
enable = true;
name = "vint";
entry = "${pkgs.vim-vint}/bin/vint";
files = "\\.vim$";
};
};
};
};
# for apps
packages.ddc-source-neorg = pkgs.vimUtils.buildVimPlugin {
name = "ddc-source-neorg";
src = lib.cleanSource ./.;
dontBuild = true;
buildInputs = with pkgs; [ deno ];
};
apps = import ./nix/app.nix { inherit self' pkgs; };
devShells.default = pkgs.mkShell {
inherit (self'.checks.pre-commit-check) shellHook;
packages = [ ];
};
};
});
}