tangled
alpha
login
or
join now
encode42.dev
/
nixos
0
fork
atom
Personal-use NixOS configuration
0
fork
atom
overview
issues
pulls
pipelines
Drop searx entirely
encode42.dev
2 months ago
8435e9f2
8fd48aa3
+1
-551
3 changed files
expand all
collapse all
unified
split
hosts
index
config
web
searx.nix
default.nix
packages
server
web
searx.nix
-35
hosts/index/config/web/searx.nix
reviewed
···
1
1
-
{ flakeRoot, ... }:
2
2
-
3
3
-
let
4
4
-
host = "search.encrypted.group";
5
5
-
6
6
-
searxModule = import (flakeRoot + /packages/server/web/searx.nix) {
7
7
-
hosts = [
8
8
-
{
9
9
-
name = host;
10
10
-
ssl = "cloudflare";
11
11
-
}
12
12
-
];
13
13
-
};
14
14
-
in
15
15
-
{
16
16
-
imports = [
17
17
-
searxModule
18
18
-
];
19
19
-
20
20
-
services.searx = {
21
21
-
environmentFile = "/mnt/apps/searx/searx.env";
22
22
-
23
23
-
settings = {
24
24
-
general = {
25
25
-
instance_name = "encrypted group search";
26
26
-
};
27
27
-
28
28
-
server = {
29
29
-
base_url = "https://${host}";
30
30
-
31
31
-
secret_key = "@SEARXNG_SECRET@";
32
32
-
};
33
33
-
};
34
34
-
};
35
35
-
}
+1
-1
hosts/index/default.nix
reviewed
···
47
47
./config/web/forgejo.nix
48
48
./config/web/linkwarden.nix
49
49
./config/web/miniflux.nix
50
50
-
./config/web/network-optimization.nix
50
50
+
./config/web/network-optimizer.nix
51
51
./config/web/vaultwarden.nix
52
52
#./config/web/wakapi.nix
53
53
-515
packages/server/web/searx.nix
reviewed
···
1
1
-
{
2
2
-
hosts ? [ ],
3
3
-
}:
4
4
-
5
5
-
{
6
6
-
config,
7
7
-
lib,
8
8
-
flakeLib,
9
9
-
...
10
10
-
}:
11
11
-
12
12
-
{
13
13
-
services.searx = {
14
14
-
enable = true;
15
15
-
16
16
-
redisCreateLocally = true;
17
17
-
18
18
-
configureUwsgi = true;
19
19
-
uwsgiConfig = {
20
20
-
socket = "/run/searx/searx.sock";
21
21
-
http = ":8888";
22
22
-
chmod-socket = "660";
23
23
-
};
24
24
-
25
25
-
settings = {
26
26
-
general = {
27
27
-
donation_url = false;
28
28
-
contact_url = false;
29
29
-
enable_metrics = false;
30
30
-
};
31
31
-
32
32
-
ui = {
33
33
-
center_alignment = true;
34
34
-
infinite_scroll = true;
35
35
-
36
36
-
cache_url = "https://archive.today/";
37
37
-
38
38
-
static_use_hash = true;
39
39
-
query_in_title = false;
40
40
-
};
41
41
-
42
42
-
search = {
43
43
-
autocomplete = "duckduckgo";
44
44
-
favicon_resolver = "allesedv";
45
45
-
46
46
-
formats = [
47
47
-
"html"
48
48
-
"json"
49
49
-
];
50
50
-
};
51
51
-
52
52
-
server = {
53
53
-
public_instance = true;
54
54
-
limiter = true;
55
55
-
56
56
-
image_proxy = true;
57
57
-
58
58
-
method = "GET";
59
59
-
60
60
-
bind_address = "127.0.0.1";
61
61
-
};
62
62
-
63
63
-
limiterSettings = {
64
64
-
real_ip = {
65
65
-
x_for = 1;
66
66
-
};
67
67
-
68
68
-
botdetection = {
69
69
-
ip_limit = {
70
70
-
filter_link_local = true;
71
71
-
link_token = false;
72
72
-
};
73
73
-
};
74
74
-
};
75
75
-
76
76
-
engines = lib.mapAttrsToList (name: value: { inherit name; } // value) {
77
77
-
# GENERAL
78
78
-
# translate
79
79
-
"dictzone".disabled = true;
80
80
-
"libretranslate".disabled = true;
81
81
-
"lingva".disabled = true;
82
82
-
"mozhi".disabled = true;
83
83
-
"mymemory translated".disabled = true;
84
84
-
85
85
-
# web
86
86
-
"bing".disabled = true;
87
87
-
"brave".disabled = false;
88
88
-
"duckduckgo".disabled = false;
89
89
-
"google".disabled = true;
90
90
-
"mojeek".disabled = true;
91
91
-
"presearch".disabled = true;
92
92
-
"presearch videos".disabled = true;
93
93
-
"qwant".disabled = true;
94
94
-
"startpage".disabled = true;
95
95
-
"wiby".disabled = true;
96
96
-
"yahoo".disabled = true;
97
97
-
"seznam (CZ)".disabled = true;
98
98
-
"goo (JA)".disabled = true;
99
99
-
"naver (KO)".disabled = true;
100
100
-
101
101
-
# wikimedia
102
102
-
"wikibooks".disabled = true;
103
103
-
"wikiquote".disabled = true;
104
104
-
"wikisource".disabled = true;
105
105
-
"wikispecies".disabled = true;
106
106
-
"wikiversity".disabled = true;
107
107
-
"wikivoyage".disabled = true;
108
108
-
109
109
-
# custom
110
110
-
"modrinth" = {
111
111
-
disabled = true;
112
112
-
categories = [ "general" ];
113
113
-
shortcut = "mr";
114
114
-
115
115
-
engine = "json_engine";
116
116
-
117
117
-
search_url = "https://api.modrinth.com/v2/search?query={query}&offset={pageno}&limit=1&index=relevance&facets=%5B%5B%22downloads%20%3E=%20500%22%5D%5D";
118
118
-
paging = true;
119
119
-
page_size = 1;
120
120
-
first_page_num = 0;
121
121
-
122
122
-
results_query = "hits";
123
123
-
title_query = "title";
124
124
-
content_query = "description";
125
125
-
thumbnail_query = "featured_gallery";
126
126
-
url_query = "project_id";
127
127
-
url_prefix = "https://modrinth.com/project/";
128
128
-
129
129
-
weight = 1;
130
130
-
};
131
131
-
132
132
-
# without further subgrouping
133
133
-
"ask".disabled = true;
134
134
-
"cloudflareai".disabled = true;
135
135
-
"crowdview".disabled = true;
136
136
-
"curlie".disabled = true;
137
137
-
"currency".disabled = false;
138
138
-
"ddg definitions".disabled = true;
139
139
-
"encyclosearch".disabled = true;
140
140
-
"mwmbl".disabled = true;
141
141
-
"right dao".disabled = true;
142
142
-
"searchmysite".disabled = true;
143
143
-
"stract".disabled = true;
144
144
-
"tineye".disabled = false;
145
145
-
"wikidata".disabled = true;
146
146
-
"wikipedia" = {
147
147
-
disabled = false;
148
148
-
149
149
-
timeout = 1.0;
150
150
-
weight = 2;
151
151
-
};
152
152
-
"wolframalpha".disabled = true;
153
153
-
"yacy".disabled = true;
154
154
-
"yep".disabled = true;
155
155
-
"bpb (DE)".disabled = true;
156
156
-
"tagesschau (DE)".disabled = true;
157
157
-
"wikimini (FR)".disabled = true;
158
158
-
159
159
-
# IMAGES
160
160
-
# web
161
161
-
"bing images".disabled = true;
162
162
-
"brave.images".disabled = true;
163
163
-
"duckduckgo images".disabled = true;
164
164
-
"google images".disabled = false;
165
165
-
"mojeek images".disabled = true;
166
166
-
"presearch images".disabled = true;
167
167
-
"qwant images".disabled = true;
168
168
-
169
169
-
# without further subgrouping
170
170
-
"1x".disabled = true;
171
171
-
"adobe stock".disabled = true;
172
172
-
"artic".disabled = true;
173
173
-
"deviantart" = {
174
174
-
disabled = false;
175
175
-
176
176
-
weight = 0.2;
177
177
-
};
178
178
-
"findthatmeme".disabled = true;
179
179
-
"flickr".disabled = true;
180
180
-
"frinkiac".disabled = true;
181
181
-
"imgur" = {
182
182
-
disabled = false;
183
183
-
184
184
-
weight = 0.2;
185
185
-
};
186
186
-
"library of congress".disabled = true;
187
187
-
"material icons".disabled = true;
188
188
-
"openverse" = {
189
189
-
disabled = false;
190
190
-
191
191
-
weight = 0.5;
192
192
-
};
193
193
-
"pinterest".disabled = true;
194
194
-
"svgrepo".disabled = true;
195
195
-
"unsplash" = {
196
196
-
disabled = false;
197
197
-
198
198
-
weight = 0.5;
199
199
-
};
200
200
-
"wallhaven".disabled = true;
201
201
-
"wikicommons.images" = {
202
202
-
disabled = false;
203
203
-
204
204
-
weight = 2;
205
205
-
};
206
206
-
"yacy images".disabled = true;
207
207
-
"yep images".disabled = true;
208
208
-
"seekr images (EN)".disabled = true;
209
209
-
210
210
-
# VIDEOS
211
211
-
# web
212
212
-
"bing videos".disabled = false;
213
213
-
"brave.videos".disabled = true;
214
214
-
"duckduckgo videos".disabled = true;
215
215
-
"google videos".disabled = true;
216
216
-
"qwant videos".disabled = true;
217
217
-
218
218
-
# without further subgrouping
219
219
-
"adobe stock video".disabled = true;
220
220
-
"bilibili" = {
221
221
-
disabled = false;
222
222
-
223
223
-
weight = 0.2;
224
224
-
};
225
225
-
"dailymotion".disabled = true;
226
226
-
"google play movies".disabled = true;
227
227
-
"invidious".disabled = true;
228
228
-
"livespace".disabled = true;
229
229
-
"media.ccc.de".disabled = true;
230
230
-
"odysee".disabled = false;
231
231
-
"peertube".disabled = true;
232
232
-
"piped".disabled = true;
233
233
-
"rumble".disabled = true;
234
234
-
"sepiasearch".disabled = false;
235
235
-
"vimeo" = {
236
236
-
disabled = false;
237
237
-
238
238
-
weight = 0.5;
239
239
-
};
240
240
-
"wikicommons.videos" = {
241
241
-
disabled = false;
242
242
-
243
243
-
weight = 2;
244
244
-
};
245
245
-
"youtube".disabled = false;
246
246
-
"mediathekviewweb (DE)".disabled = true;
247
247
-
"seekr videos (EN)".disabled = true;
248
248
-
"ina (FR)".disabled = true;
249
249
-
250
250
-
# NEWS
251
251
-
# web
252
252
-
"duckduckgo news".disabled = true;
253
253
-
"mojeek news".disabled = false;
254
254
-
255
255
-
# wikimedia
256
256
-
"wikinews" = {
257
257
-
disabled = false;
258
258
-
259
259
-
weight = 2;
260
260
-
};
261
261
-
262
262
-
# without further subgrouping
263
263
-
"bing news".disabled = true;
264
264
-
"brave.news".disabled = true;
265
265
-
"google news".disabled = true;
266
266
-
"qwant news".disabled = true;
267
267
-
"yahoo news".disabled = true;
268
268
-
"yep news".disabled = true;
269
269
-
"seekr news (EN)".disabled = true;
270
270
-
271
271
-
# MAP
272
272
-
"apple maps".disabled = true;
273
273
-
"openstreetmap".disabled = false;
274
274
-
"photon".disabled = true;
275
275
-
276
276
-
# MUSIC
277
277
-
# lyrics
278
278
-
"genius".disabled = false;
279
279
-
280
280
-
# radio
281
281
-
"radio browser".disabled = false;
282
282
-
283
283
-
# without further subgrouping
284
284
-
"adobe stock audio".disabled = true;
285
285
-
"bandcamp" = {
286
286
-
disabled = false;
287
287
-
288
288
-
weight = 2;
289
289
-
};
290
290
-
"deezer".disabled = true;
291
291
-
"mixcloud".disabled = true;
292
292
-
"piped.music".disabled = true;
293
293
-
"soundcloud" = {
294
294
-
disabled = false;
295
295
-
296
296
-
weight = 0.5;
297
297
-
};
298
298
-
"wikicommons.audio" = {
299
299
-
disabled = false;
300
300
-
301
301
-
weight = 0.2;
302
302
-
};
303
303
-
304
304
-
# IT
305
305
-
# packages
306
306
-
"alpine linux packages".disabled = true;
307
307
-
"crates.io" = {
308
308
-
disabled = false;
309
309
-
310
310
-
weight = 0.6;
311
311
-
};
312
312
-
"docker hub".disabled = true;
313
313
-
"hex".disabled = true;
314
314
-
"hoogle".disabled = true;
315
315
-
"lib.rs".disabled = true;
316
316
-
"metacpan".disabled = true;
317
317
-
"npm" = {
318
318
-
disabled = false;
319
319
-
320
320
-
weight = 0.6;
321
321
-
};
322
322
-
"packagist".disabled = true;
323
323
-
"pkg.go.dev" = {
324
324
-
disabled = false;
325
325
-
326
326
-
weight = 0.6;
327
327
-
};
328
328
-
"pub.dev" = {
329
329
-
disabled = false;
330
330
-
331
331
-
weight = 0.5;
332
332
-
};
333
333
-
"pypi" = {
334
334
-
disabled = false;
335
335
-
336
336
-
weight = 0.5;
337
337
-
};
338
338
-
"rubygems".disabled = true;
339
339
-
"voidlinux".disabled = true;
340
340
-
341
341
-
# q&a
342
342
-
"askubuntu".disabled = true;
343
343
-
"caddy.community".disabled = false;
344
344
-
"discuss.python".disabled = true;
345
345
-
"pi-hole.community".disabled = true;
346
346
-
"stackoverflow".disabled = false;
347
347
-
"superuser".disabled = false;
348
348
-
349
349
-
# repos
350
350
-
"bitbucket" = {
351
351
-
disabled = false;
352
352
-
353
353
-
weight = 0.7;
354
354
-
};
355
355
-
"codeberg" = {
356
356
-
disabled = false;
357
357
-
358
358
-
weight = 0.8;
359
359
-
};
360
360
-
"gitea.com" = {
361
361
-
disabled = false;
362
362
-
363
363
-
weight = 0.8;
364
364
-
};
365
365
-
"github" = {
366
366
-
disabled = false;
367
367
-
368
368
-
weight = 0.8;
369
369
-
};
370
370
-
"gitlab" = {
371
371
-
disabled = false;
372
372
-
373
373
-
weight = 0.7;
374
374
-
};
375
375
-
"sourcehut" = {
376
376
-
disabled = false;
377
377
-
378
378
-
weight = 0.7;
379
379
-
};
380
380
-
381
381
-
# software wikis
382
382
-
"arch linux wiki".disabled = false;
383
383
-
"free software directory".disabled = true;
384
384
-
"gentoo".disabled = true;
385
385
-
386
386
-
# without further subgrouping
387
387
-
"anaconda".disabled = true;
388
388
-
"cpprefrence".disabled = true;
389
389
-
"habrahabr".disabled = true;
390
390
-
"hackernews".disabled = false;
391
391
-
"lobste.rs".disabled = false;
392
392
-
"mankier" = {
393
393
-
disabled = false;
394
394
-
395
395
-
weight = 2;
396
396
-
};
397
397
-
"mdn" = {
398
398
-
disabled = false;
399
399
-
400
400
-
weight = 2;
401
401
-
};
402
402
-
"searchcode".disabled = true;
403
403
-
404
404
-
# SCIENCE
405
405
-
# scientific publications
406
406
-
"arxiv".disabled = true;
407
407
-
"crossref".disabled = true;
408
408
-
"google scholar".disabled = false;
409
409
-
"pubmed".disabled = false;
410
410
-
"semanticscholar".disabled = true;
411
411
-
412
412
-
# without further subgrouping
413
413
-
"openairedatasets".disabled = true;
414
414
-
"openairepublications".disabled = true;
415
415
-
"pdbe".disabled = true;
416
416
-
417
417
-
# FILES
418
418
-
# apps
419
419
-
"apk mirror".disabled = true;
420
420
-
"apple app store".disabled = false;
421
421
-
"fdroid".disabled = false;
422
422
-
"google play apps" = {
423
423
-
disabled = false;
424
424
-
425
425
-
weight = 0.8;
426
426
-
};
427
427
-
428
428
-
# without further subgrouping
429
429
-
"1337x".disabled = true;
430
430
-
"annas archive".disabled = true;
431
431
-
"bt4g".disabled = true;
432
432
-
"btdigg".disabled = true;
433
433
-
"kickass".disabled = true;
434
434
-
"library genesis".disabled = true;
435
435
-
"nyaa".disabled = true;
436
436
-
"openrepos".disabled = true;
437
437
-
"piratebay".disabled = true;
438
438
-
"solidtorrents".disabled = true;
439
439
-
"tokyotoshokan".disabled = true;
440
440
-
"wikicommons.files".disabled = false;
441
441
-
"z-library".disabled = true;
442
442
-
443
443
-
# SOCIAL MEDIA
444
444
-
"9gag".disabled = true;
445
445
-
"lemmy comments".disabled = false;
446
446
-
"lemmy communities".disabled = true;
447
447
-
"lemmy posts".disabled = false;
448
448
-
"lemmy users".disabled = true;
449
449
-
"mastodon hashtags".disabled = false;
450
450
-
"mastodon users".disabled = true;
451
451
-
"reddit" = {
452
452
-
disabled = false;
453
453
-
454
454
-
weight = 1.2;
455
455
-
};
456
456
-
"tootfinder".disabled = false;
457
457
-
458
458
-
# OTHER
459
459
-
# dictionaries
460
460
-
"etymonline".disabled = true;
461
461
-
"wiktionary".disabled = true;
462
462
-
"wordnik".disabled = true;
463
463
-
"duden (DE)".disabled = true;
464
464
-
"woxikon.de synonyme (DE)".disabled = true;
465
465
-
"jisho (JA)".disabled = true;
466
466
-
"sjp.pwn (PL)".disabled = true;
467
467
-
468
468
-
# movies
469
469
-
"imdb".disabled = true;
470
470
-
"rottentomatoes".disabled = true;
471
471
-
"tmdb".disabled = true;
472
472
-
"moviepilot (DE)".disabled = true;
473
473
-
474
474
-
# shopping
475
475
-
"geizhals (DE)".disabled = true;
476
476
-
477
477
-
# weather
478
478
-
"duckduckgo weather".disabled = true;
479
479
-
"openmeteo".disabled = true;
480
480
-
"wttr.in".diasbled = true;
481
481
-
482
482
-
# without further subgrouping
483
483
-
"emojipedia".disabled = true;
484
484
-
"erowid".disabled = true;
485
485
-
"fyyd".disabled = true;
486
486
-
"goodreads".disabled = true;
487
487
-
"openlibrary".disabled = true;
488
488
-
"podcastindex".disabled = true;
489
489
-
"yummly".disabled = true;
490
490
-
"chefkoch (DE)".disabled = true;
491
491
-
"destatis (DE)".disabled = true;
492
492
-
};
493
493
-
494
494
-
enabled_plugins = [
495
495
-
"Unit converter plugin"
496
496
-
"Self Information"
497
497
-
"Hash plugin"
498
498
-
"Open Access DOI rewrite"
499
499
-
"Tracker URL remover"
500
500
-
];
501
501
-
};
502
502
-
};
503
503
-
504
504
-
# Caddy reverse proxy configuration
505
505
-
users.users.caddy.extraGroups = [ config.users.users.searx.group ];
506
506
-
507
507
-
services.caddy.virtualHosts = flakeLib.mkProxies hosts ''
508
508
-
reverse_proxy unix/${config.services.searx.uwsgiConfig.socket} {
509
509
-
transport uwsgi
510
510
-
511
511
-
header_up X-Forwarded-For {http.request.header.CF-Connecting-IP}
512
512
-
header_up X-Real-IP {http.request.header.CF-Connecting-IP}
513
513
-
}
514
514
-
'';
515
515
-
}