tangled
alpha
login
or
join now
wiro.world
/
dotfiles
2
fork
atom
yep, more dotfiles
2
fork
atom
overview
issues
1
pulls
1
pipelines
server: proxy github pages for website
wiro.world
4 months ago
683e0b04
cde7d900
verified
This commit was signed with the committer's
known signature
.
wiro.world
SSH Key Fingerprint:
SHA256:SmMcWpNAnL+VAgItSawvXgdPVn7f1rsyAuB/5VNclKY=
+69
-8
1 changed file
expand all
collapse all
unified
split
nixos
profiles
server.nix
+69
-8
nixos/profiles/server.nix
···
1
1
{ self
2
2
, config
3
3
+
, pkgs
3
4
, upkgs
4
5
, ...
5
6
}:
···
15
16
external-netmask6 = 64;
16
17
external-gw6 = "fe80::1";
17
18
18
18
-
# website-port = 3000;
19
19
-
# website-hostname = "wiro.world";
19
19
+
well-known-discord-dir = pkgs.writeTextDir ".well-known/discord" ''
20
20
+
dh=919234284ceb2aba439d15b9136073eb2308989b
21
21
+
'';
22
22
+
webfinger-dir = pkgs.writeTextDir ".well-known/webfinger" ''
23
23
+
{
24
24
+
"subject": "acct:milo@wiro.world",
25
25
+
"aliases": [
26
26
+
"mailto:milo@wiro.world",
27
27
+
"https://wiro.world/"
28
28
+
],
29
29
+
"links": [
30
30
+
{
31
31
+
"rel": "http://wiro.world/rel/avatar",
32
32
+
"href": "https://wiro.world/logo.jpg",
33
33
+
"type": "image/jpeg"
34
34
+
},
35
35
+
{
36
36
+
"rel": "http://webfinger.net/rel/profile-page",
37
37
+
"href": "https://wiro.world/",
38
38
+
"type": "text/html"
39
39
+
},
40
40
+
{
41
41
+
"rel": "http://openid.net/specs/connect/1.0/issuer",
42
42
+
"href": "https://auth.wiro.world"
43
43
+
}
44
44
+
]
45
45
+
}
46
46
+
'';
47
47
+
website-hostname = "wiro.world";
20
48
21
49
pds-port = 3001;
22
50
pds-hostname = "pds.wiro.world";
···
119
147
}
120
148
'';
121
149
122
122
-
# TODO: add webfinger
123
123
-
# https://willnorris.com/2023/caddy-snippets/#webfinger
124
124
-
125
125
-
# virtualHosts.${website-hostname}.extraConfig = ''
126
126
-
# reverse_proxy http://localhost:${toString website-port}
127
127
-
# '';
150
150
+
virtualHosts.${website-hostname}.extraConfig =
151
151
+
''
152
152
+
@discord {
153
153
+
path /.well-known/discord
154
154
+
method GET HEAD
155
155
+
}
156
156
+
route @discord {
157
157
+
header {
158
158
+
Access-Control-Allow-Origin "*"
159
159
+
X-Robots-Tag "noindex"
160
160
+
}
161
161
+
root ${well-known-discord-dir}
162
162
+
file_server
163
163
+
}
164
164
+
'' +
165
165
+
''
166
166
+
@webfinger {
167
167
+
path /.well-known/webfinger
168
168
+
method GET HEAD
169
169
+
query resource=acct:milo@wiro.world
170
170
+
query resource=mailto:milo@wiro.world
171
171
+
query resource=https://wiro.world
172
172
+
query resource=https://wiro.world/
173
173
+
}
174
174
+
route @webfinger {
175
175
+
header {
176
176
+
Content-Type "application/jrd+json"
177
177
+
Access-Control-Allow-Origin "*"
178
178
+
X-Robots-Tag "noindex"
179
179
+
}
180
180
+
root ${webfinger-dir}
181
181
+
file_server
182
182
+
}
183
183
+
'' +
184
184
+
''
185
185
+
reverse_proxy https://mrnossiom.github.io {
186
186
+
header_up Host {http.request.host}
187
187
+
}
188
188
+
'';
128
189
129
190
virtualHosts.${grafana-hostname}.extraConfig = ''
130
191
reverse_proxy http://localhost:${toString grafana-port}