-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
284 lines (258 loc) · 7.95 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
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
{
description = "LegendOfMiracles's system config";
inputs = {
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
#nixpkgs.url = "git+file:///home/lom/nixpkgs?ref=nixos-unstable";
#nixpkgs.url = "git+file:///home/lom/nixpkgs?ref=upddate-nodjs-asf";
home-manager.url = "github:nix-community/home-manager";
# home-manager.url = "/home/nix/home-manager";
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix.url = "github:ryantm/agenix";
nix-gaming.url = "github:fufexan/nix-gaming";
nixvim = {
url = "github:pta2002/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, ... }@inputs: {
inherit self inputs;
nixosModules = {
choice = import ./modules inputs;
config = {
nixos = {
xorg = import ./xorg.nix;
defaults = import ./defaults-nixos.nix;
v4l2 = import ./v4l2;
remote-build-host = import ./distributed-build-host.nix;
network = import ./network.nix;
printer = import ./printer.nix;
fonts = import ./fonts.nix;
};
hm = {
proton = import ./hm/proton.nix;
xorg = import ./hm/xorg-hm.nix;
mangohud = import ./hm/mangohud.nix;
qt = import ./hm/qt.nix;
espanso = import ./hm/espanso.nix;
dunst = import ./hm/dunst.nix;
defaults = import ./hm/defaults.nix;
git = import ./hm/git.nix;
gtk = import ./hm/gtk.nix;
mpv = import ./hm/mpv.nix;
fish = import ./hm/fish.nix;
htop = import ./hm/htop.nix;
nvim = import ./hm/nvim.nix;
pass = import ./hm/pass.nix;
scripts = import ./hm/shell-scripts.nix;
mori = import ./hm/mori.nix;
neofetch = import ./hm/neofetch.nix;
alacritty = import ./hm/alacritty.nix;
firefox = import ./hm/firefox.nix;
newsboat = import ./hm/newsboat.nix;
aw = import ./hm/aw.nix;
};
};
};
homeConfigurations = let pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
in {
wsl = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = with self.nixosModules.config.hm; [
{
home = {
stateVersion = "22.05";
homeDirectory = "/home/lom";
username = "lom";
packages = with pkgs;
with import ./hm/shell-scripts.nix {
inherit pkgs inputs lib;
}; [
zerox0
giphsh
discord-id
rclip
command-not-found
yt
hstrace
hydra-check
lucky-commit
up
nixfmt
pavucontrol
tealdeer
nix-index
bc
nvd
bat
fzf
jq
nix-review
ouch
tmpmail
keymapviz
];
};
}
git
htop
defaults
pass
neofetch
newsboat
fish
inputs.nixvim.homeManagerModules.nixvim
nvim
];
};
};
nixosConfigurations = {
pain = inputs.nixpkgs.lib.makeOverridable inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with self.nixosModules; [
# system wide config
./hosts/pain/configuration.nix
xorg
v4l2
nix-gaming.nixosModule
home-manager.nixosModules.home-manager
nixos-hardware.nixosModules.common-cpu-intel
distributed-build-host
cowsay
fonts
network
#printer
({ pkgs, lib, ... }:
let
mkDevelopModule = i: m: {
disabledModules = [ m ];
imports = [ "${i}/nixos/modules/${m}" ];
};
in {
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.nix = { pkgs, lib, ... }:
with import ./hm/shell-scripts.nix {
inherit pkgs inputs lib;
}; {
imports = [
firefox
mangohud
git
htop
defaults
alacritty
#mori
dunst
mpv
xorg-hm
pass
neofetch
qt
newsboat
#proton
#aw
fish
# my config
espanso
inputs.nixvim.homeManagerModules.nixvim
nvim
gtk
# the module
espanso-m
];
home.packages = with pkgs; [
# custom shell script
zerox0
text_from_image
auto_clicker
nvidia-offload
giphsh
discord-id
rclip
command-not-found
store-path
yt
mute
hstrace
helvum
tmux
hydra-check
ffmpeg
lutris
obs-studio
gimp
lucky-commit
up
nixfmt
pavucontrol
(polymc.override {
msaClientID = "01524508-0110-46fc-b468-362d31ca41e6";
})
copyq
qrcp
tealdeer
nix-index
bc
nvd
bat
fzf
jq
manix
nix-review
ouch
imagemagick
tmpmail
cliscord
keymapviz
#present
autobahn
#discover
#ab-street
];
services.kdeconnect = {
enable = true;
indicator = true;
};
};
})
];
};
pi = inputs.nixpkgs.lib.makeOverridable inputs.nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = with self.nixosModules; [
./hosts/pi/configuration.nix
config.nixos.defaults
inputs.agenix.nixosModules.default
choice.discord-message-sender
];
};
pi-kb =
inputs.nixpkgs.lib.makeOverridable inputs.nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = with self.nixosModules; [
({ config, pkgs, ... }: { nixpkgs.overlays = [ self.overlays.default ]; })
./hosts/pi-kb/configuration.nix
config.nixos.defaults
inputs.agenix.nixosModules.default
#choice.photoprism-mod
];
};
};
/* outputsBuilder = channels: {
packages = utils.lib.exportPackages self.overlays channels;
};
*/
overlays.default = import ./overlays;
devShells.x86_64-linux.default = inputs.nixpkgs.legacyPackages.x86_64-linux.mkShell {
name = "Secrets shell";
buildInputs = [
inputs.agenix.packages.x86_64-linux.agenix
];
EDITOR = "nvim";
};
};
}