tangled
alpha
login
or
join now
koi.rip
/
dotfiles
0
fork
atom
my nixos dotfiles :3 (git.koi.rip mirror)
git.koi.rip/koi/dotfiles
linux
dotfiles
neovim
nixos
catppuccin
0
fork
atom
overview
issues
pulls
pipelines
seber: ebil pages index.txt support
koi.rip
2 months ago
f24c7b53
c6013cdd
+17
-4
1 changed file
expand all
collapse all
unified
split
systems
seber
services
ebil-club.nix
+17
-4
systems/seber/services/ebil-club.nix
···
24
24
services.nginx.virtualHosts = {
25
25
"${servedHost}" = (
26
26
{
27
27
-
locations."/" = {
28
28
-
root = rootDir;
29
29
-
index = "index.html";
30
30
-
extraConfig = "try_files $uri $uri/ =404;";
27
27
+
locations = {
28
28
+
"/" = {
29
29
+
root = rootDir;
30
30
+
index = "index.html";
31
31
+
extraConfig = ''
32
32
+
if ($http_user_agent ~* "curl") {
33
33
+
rewrite ^ /index.txt last;
34
34
+
}
35
35
+
try_files $uri $uri/ =404;
36
36
+
'';
37
37
+
};
38
38
+
"/index.txt" = {
39
39
+
root = rootDir;
40
40
+
extraConfig = "try_files /index.txt @curl_fallback;";
41
41
+
};
42
42
+
"@curl_fallback".return =
43
43
+
"200 'hi! this site is best viewed in a web browser :3 if u still want to curl it, try setting a different user-agent header'";
31
44
};
32
45
extraConfig = "error_page 404 /404.html;";
33
46
}