-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
269 lines (251 loc) · 7.97 KB
/
Copy pathflake.nix
File metadata and controls
269 lines (251 loc) · 7.97 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
{
description = "Devins2518's system config";
inputs = {
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly = {
url = "github:nix-community/neovim-nightly-overlay";
# url = "/Users/devin/Repos/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
emacs-nightly = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:NixOS/nixpkgs";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nur.url = "github:nix-community/NUR/main";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
rust-overlay = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-ld = {
url = "github:Mic92/nix-ld";
inputs.nixpkgs.follows = "nixpkgs";
};
zig-overlay = {
url = "github:mitchellh/zig-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
zls-master = {
url = "github:zigtools/zls";
inputs.nixpkgs.follows = "nixpkgs";
inputs.zig-overlay.follows = "zig-overlay";
};
};
outputs = { self, darwin, fenix, nixpkgs, nixpkgs-unstable, home-manager
, utils, nixos-hardware, neovim-nightly, nix-ld, emacs-nightly, nur
, rust-overlay, zig-overlay, zls-master }@inputs:
utils.lib.mkFlake rec {
inherit self inputs;
nixosModules = utils.lib.exportModules [
########### Not done
# add other scripts here
./HM/shell-scripts.nix
./HM/iterm2.nix
./HM/emacs.nix
./HM/river.nix
./HM/foot.nix
./HM/ssh.nix
# ./HM/kakoune.nix
########### Done for despair
./HM/bspwm.nix
./HM/dev
./HM/devin
./HM/Devins-MacBook-Pro
./HM/dunst.nix
./HM/pdf.nix
./HM/rofi.nix
./HM/tmux.nix
./HM/xorg-hm.nix
./HM/mako.nix
./HM/zathura.nix
./HM/cursor.nix
./HM/configFolder.nix
./xorg.nix
./wayland.nix
########### Done fully i think
./HM/nvfancontrol.nix
./HM/zsh.nix
###########
./HM/alacritty.nix
./HM/defaults.nix
./HM/helix.nix
./HM/dconf.nix
./HM/git.nix
./HM/gtk.nix
./HM/mpv.nix
./HM/nvim.nix
./HM/pass.nix
./HM/qt.nix
#./HM/firefox.nix
./defaults-nix.nix
./defaults-darwin.nix
./network.nix
];
hostDefaults = {
modules = [
home-manager.nixosModules.home-manager
self.nixosModules.defaults-nix
nix-ld.nixosModules.nix-ld
];
extraArgs = { inherit inputs; };
};
channels = {
nixpkgs = {
input = nixpkgs;
config = { allowUnfree = true; };
};
nixpkgs-unstable = { input = nixpkgs; };
darwin = { input = darwin; };
};
x-org = with self.nixosModules; [
xorg
({ pkgs, ... }: {
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.devin = ({ config, pkgs, ... }:
with import ./HM/shell-scripts.nix {
inherit pkgs;
clipboard = "xclip -selection clipboard";
sstool = "maim";
selarg = "-s";
}; {
imports = [ alacritty bspwm dunst rofi xorg-hm ];
home.packages = with pkgs; [ autoclose compilenote screenshot ];
});
})
];
wayland-opt = with self.nixosModules; [
wayland
({ pkgs, ... }: {
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.devin = ({ config, pkgs, ... }:
with import ./HM/shell-scripts.nix {
inherit pkgs;
clipboard = "wl-copy";
sstool = "grim -c";
selarg = ''-g "$(slurp)"'';
}; {
imports = [ foot river dconf mako ];
home.packages = with pkgs; [ compilenote screenshot ];
});
})
];
darwinConfigurations."Devins-MacBook-Pro" = darwin.lib.darwinSystem {
inherit inputs;
system = "aarch64-darwin";
modules = with self.nixosModules; [
# system wide config
./hosts/Devins-MacBook-Pro/configuration.nix
home-manager.darwinModules.home-manager
defaults-darwin
({ pkgs, ... }: {
nixpkgs.overlays = sharedOverlays;
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.devin = ({ config, pkgs, ... }:
with import ./HM/shell-scripts.nix { inherit pkgs; }; {
imports =
[ defaults emacs git iterm2 nvim pass pdf ssh zathura zsh ];
home.packages = with pkgs; [ cachix-push ];
});
})
];
};
hosts = {
dev = {
modules = with self.nixosModules;
[
# system wide config
./hosts/dev/configuration.nix
network
({ pkgs, ... }: {
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.devin = ({ config, pkgs, ... }:
with import ./HM/shell-scripts.nix { inherit pkgs; }; {
imports = [
cursor
dconf
defaults
git
gtk
helix
mpv
nvfancontrol
nvim
pass
pdf
qt
tmux
zathura
zsh
] ++ dev.x-org ++ dev.default;
home.packages = with pkgs; [ cachix-push ];
});
})
] ++ x-org;
};
devin = {
modules = with self.nixosModules;
[
# system wide config
./hosts/devin/configuration.nix
network
nixos-hardware.nixosModules.microsoft-surface
({ pkgs, ... }: {
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.devin = ({ config, pkgs, ... }:
with import ./HM/shell-scripts.nix { inherit pkgs; }; {
imports = [
configFolder
cursor
defaults
git
gtk
helix
mpv
nvim
pass
pdf
qt
tmux
zathura
zsh
] ++ devin.wayland ++ devin.default;
home.packages = with pkgs; [ airplane-mode cachix-push ];
});
})
] ++ wayland-opt;
};
};
sharedOverlays = [
emacs-nightly.overlay
neovim-nightly.overlays.default
nur.overlays.default
rust-overlay.overlays.default
zig-overlay.overlays.default
self.overlay
];
packagesBuilder = channels: {
inherit (channels.nixpkgs) alacritty-ligatures neovim-nightly helix-git;
};
appsBuilder = channels:
with channels.nixpkgs; {
alacritty-ligatures = utils.lib.mkApp { drv = alacritty-ligatures; };
helix-git = utils.lib.mkApp { drv = helix-git; };
};
overlay = import ./overlays;
};
}