-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
92 lines (85 loc) · 3.11 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
{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
nixvim.url = "github:nix-community/nixvim";
treefmt-nix.url = "github:numtide/treefmt-nix";
systems.url = "github:nix-systems/default";
# neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
# vendored
coq-lsp.flake = false;
coq-lsp.url = "github:tomtomjhj/coq-lsp.nvim";
coqtail.flake = false;
coqtail.url = "github:whonore/Coqtail";
minuet-ai-nvim.flake = false;
minuet-ai-nvim.url = "github:milanglacier/minuet-ai.nvim";
oatmeal.flake = false;
oatmeal.url = "github:dustinblackman/oatmeal.nvim";
octo-nvim.flake = false;
octo-nvim.url = "github:pwntester/octo.nvim";
oil-git-status.flake = false;
oil-git-status.url = "github:refractalize/oil-git-status.nvim";
org-roam-nvim.flake = false;
org-roam-nvim.url = "github:chipsenkbeil/org-roam.nvim";
orgmode.flake = false;
orgmode.url = "github:nvim-orgmode/orgmode";
schemastore-nvim.flake = false;
schemastore-nvim.url = "github:b0o/SchemaStore.nvim";
tabscope-nvim.flake = false;
tabscope-nvim.url = "github:backdround/tabscope.nvim";
vim-guise.flake = false;
vim-guise.url = "github:lambdalisue/vim-guise";
witt-neovim.flake = false;
witt-neovim.url = "github:typed-rocks/witt-neovim";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
imports = [ inputs.treefmt-nix.flakeModule ];
perSystem =
{ pkgs, system, ... }:
let
nixvimLib = inputs.nixvim.lib.${system};
nixvim' = inputs.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 system; # neovim-nightly-overlay;
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in
{
checks = {
# Run `nix flake check` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
# TODO: add `nix run github:fzakaria/nix-auto-follow -- -c`
};
# https://flake.parts/options/treefmt-nix.html#options
treefmt = {
projectRootFile = "./flake.nix";
programs = {
deadnix.enable = true;
nixfmt.enable = true;
prettier.enable = true;
statix.enable = true;
stylua.enable = true;
};
settings.global.excludes = [
# I could not find formatters for these:
"Makefile"
".git-blame-ignore-revs"
];
};
packages = {
# Lets you run `nix run .` to start nixvim
default = nvim;
};
};
};
}