-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
77 lines (74 loc) · 2.25 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
{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# nixvim.url = "github:jonboh/nixvim_";
# nixvim.url = "/home/jonboh/devel/nixvim_";
nixvim.url = "github:nix-community/nixvim";
flake-utils.url = "github:numtide/flake-utils";
nixneovimplugins.url = "github:NixNeovim/NixNeovimPlugins";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
};
outputs = {
nixpkgs,
nixvim,
flake-utils,
nixneovimplugins,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (system: let
nixvimLib = nixvim.lib.${system};
pkgs-nightly = import nixpkgs {
inherit system;
overlays = [
nixneovimplugins.overlays.default
inputs.neovim-nightly-overlay.overlays.default
inputs.neorg-overlay.overlays.default
];
};
pkgs = import nixpkgs {
inherit system;
overlays = [
nixneovimplugins.overlays.default
inputs.neorg-overlay.overlays.default
];
};
nixvim' = nixvim.legacyPackages.${system};
nvim-nightly = nixvim'.makeNixvimWithModule {
pkgs = pkgs-nightly;
module = import ./config {full = true;};
};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = import ./config {full = true;};
};
_nvim-light = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = import ./config {full = false;};
};
nvim-light = with nixpkgs.legacyPackages.${system};
stdenv.mkDerivation {
name = "nvim-light";
buildInputs = [_nvim-light];
buildCommand = ''
mkdir -p $out/bin
ln -s ${_nvim-light}/bin/nvim $out/bin/nvim-light
'';
};
in {
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNvim {
inherit nvim;
name = "A nixvim configuration";
};
};
packages = {
default = nvim-nightly;
inherit nvim-nightly;
inherit nvim;
inherit nvim-light;
};
});
}