-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
149 lines (145 loc) · 4.22 KB
/
Copy pathflake.nix
File metadata and controls
149 lines (145 loc) · 4.22 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
stable.url = "github:NixOs/nixpkgs/nixos-25.05";
nvf.url = "github:notashelf/nvf";
flake-parts.url = "github:hercules-ci/flake-parts";
base16.url = "github:SenchoPens/base16.nix";
statix.url = "github:oppiliappan/statix";
sqlit.url = "github:Maxteabag/sqlit";
};
outputs = {flake-parts, ...} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} (
orig @ {lib, ...}: let
config' = {
lsp.special.useAngular = true;
agent = {
enable = true;
};
};
in {
imports = [
(import ./modules {inherit lib config';})
];
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-apple-darwin"
];
perSystem = {
system,
lib,
...
}: let
stable = import inputs.stable {
inherit system;
config = {
allowBroken = true;
# Ok look, I get it, these neovim plugins have *no* license, but common.
allowUnfree = true;
};
overlays = [
(_: _: {
statix = inputs.statix.packages.${system}.default;
})
];
};
pkgs = import inputs.nixpkgs {
inherit system;
config = {
allowBroken = true;
# Ok look, I get it, these neovim plugins have *no* license, but common.
allowUnfree = true;
};
overlays = [
(_: _: {
statix = inputs.statix.packages.${system}.default;
})
];
};
customConfig =
lib.attrsets.overrideExisting
orig.config.programs.dashvim
{
agent = {
enable = true;
variant = "copilot";
key = "";
config = {};
};
lsp = {
useDefaultSpecialLspServers = true;
lspServers = {
nix = {
enable = true;
lsp.enable = true;
};
};
additionalConfig = {};
};
};
deps = import ./lib/dependencies.nix {
inherit pkgs stable system inputs;
};
package = import ./lib {
inherit system inputs pkgs lib stable;
config' = orig.config.programs.dashvim;
};
custom = import ./lib {
inherit system inputs pkgs lib stable;
config' = customConfig;
};
in {
_module.args = {
inherit stable pkgs;
};
devShells.default = pkgs.mkShell {
packages = with pkgs;
[
nuget
]
++ deps;
};
packages = let
mkPkgBase = neovim:
import ./lib/env.nix {
inherit pkgs neovim system inputs;
};
mkPkg = import ./lib/mkPkg.nix {inherit pkgs mkPkgBase;};
in {
dependencies = deps;
lint = inputs.statix.packages.${system}.default;
format = pkgs.alejandra;
default = mkPkg package.neovim;
minimal = mkPkg custom.neovim;
docs = import ./docs {
inherit inputs pkgs lib stable;
};
};
};
flake = _: rec {
nixosModules = {
home-manager = homeManagerModules.default;
dashvim = import ./hm inputs;
};
homeManagerModules = rec {
dashvim = import ./hm inputs;
default = dashvim;
};
};
}
);
nixConfig = {
extra-substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}