-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
87 lines (73 loc) · 1.85 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
{
description = "My own Neovim flake";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
neovimNightly = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
neovim-project-src = {
url = "github:coffebar/neovim-project";
flake = false;
};
neovim-session-manager-src = {
url = "github:Shatur/neovim-session-manager";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
neovimNightly,
flake-utils,
neovim-project-src,
neovim-session-manager-src,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlayFlakeInputs = prev: final: {
neovim = neovimNightly.packages.${prev.system}.neovim;
vimPlugins = final.vimPlugins // {
neovim-project = import ./packages/plugins/neovimProject.nix {
src = neovim-project-src;
pkgs = prev;
};
neovim-session-manager = import ./packages/plugins/neovimSessionManager.nix {
src = neovim-session-manager-src;
pkgs = prev;
};
};
};
overlayMyNeovim = prev: final: {
myNeovim = import ./packages/myNeovim.nix {
pkgs = prev;
lib = prev.lib;
};
};
pkgs = import nixpkgs {
inherit system;
overlays = [
overlayFlakeInputs
overlayMyNeovim
];
};
in
{
packages = rec {
nvim = pkgs.myNeovim;
default = nvim;
};
apps = rec {
nvim = flake-utils.lib.mkApp { drv = self.packages.${system}.nvim; };
default = nvim;
};
}
);
}