forked from isabelroses/nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
117 lines (103 loc) · 2.97 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
description = "isabelroses' neovim config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
pre-commit-nix = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
flake-compat.follows = "flake-compat";
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
};
nil = {
url = "github:oxalica/nil";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
neovim-nix = {
url = "github:willruggiano/neovim.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
pre-commit-nix.follows = "pre-commit-nix";
};
};
nekowinston-nur = {
url = "github:nekowinston/nur";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
rust-overlay.follows = "";
};
};
# maintenance
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = {flake-parts, ...} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
imports = [
inputs.neovim-nix.flakeModule
./neovim.nix
];
perSystem = {
config,
pkgs,
self',
system,
...
}: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
(_: p: {
repos = {
nekowinston = import inputs.nekowinston-nur {inherit (p) pkgs;};
};
})
];
};
checks = {
pre-commit-check = inputs.pre-commit-nix.lib.${system}.run {
src = ./.;
excludes = ["_sources/.+"];
hooks = {
alejandra.enable = true;
stylua.enable = true;
};
};
};
devShells.default = pkgs.mkShell {
inherit (self'.checks.pre-commit-check) shellHook;
buildInputs = with pkgs; [nil statix deadnix nvfetcher nix-tree];
};
formatter = pkgs.alejandra;
packages = rec {
default = neovim;
neovim = config.neovim.final;
nvim-treesitter = pkgs.callPackage ./pkgs/nvim-treesitter {};
};
};
};
nixConfig = {
extra-substituters = [
"https://pre-commit-hooks.cachix.org"
"https://nekowinston.cachix.org"
"https://isabelroses.cachix.org"
];
extra-trusted-public-keys = [
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
"nekowinston.cachix.org-1:lucpmaO+JwtoZj16HCO1p1fOv68s/RL1gumpVzRHRDs="
"isabelroses.cachix.org-1:mXdV/CMcPDaiTmkQ7/4+MzChpOe6Cb97njKmBQQmLPM="
];
};
}