-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
102 lines (89 loc) · 2.37 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
101
102
{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixvim.url = "github:nix-community/nixvim";
flake-parts.url = "github:hercules-ci/flake-parts";
nix-colors.url = "github:misterio77/nix-colors";
# Plugins not in nixpkgs
move = {
url = "github:fedepujol/move.nvim";
flake = false;
};
cmp-vimtex = {
url = "github:micangl/cmp-vimtex";
flake = false;
};
cmp-nerdfont = {
url = "github:chrisgrieser/cmp-nerdfont";
flake = false;
};
obsidian-bridge = {
url = "github:oflisback/obsidian-bridge.nvim";
flake = false;
};
obsidian-todo = {
url = "github:LilleAila/obsidian-todo.nvim";
inputs.nixpkgs.follows = "nixpkgs";
};
data-viewer = {
url = "github:VidocqH/data-viewer.nvim";
flake = false;
};
zotcite = {
url = "github:jalvesaq/zotcite";
flake = false;
};
cmp-zotcite = {
url = "github:jalvesaq/cmp-zotcite";
flake = false;
};
};
outputs = {
nixvim,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
perSystem = {
pkgs,
system,
...
}: let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = let
mkKeymap = mode: key: action: desc: {
inherit mode key action;
options = {
inherit desc;
silent = true;
noremap = true;
};
};
mkRegistration = key: desc: {
__unkeyed-1 = key;
inherit desc;
};
colorScheme = inputs.nix-colors.colorSchemes.gruvbox-dark-medium;
in {
inherit pkgs;
module = import ./config;
extraSpecialArgs = {inherit inputs mkKeymap mkRegistration colorScheme;};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in {
checks.default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
packages.default = nvim;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nixd
alejandra
lua-language-server
stylua
];
};
};
};
}