This repository has no description
2.7 kB
91 lines
1{ pkgs, ... }:
2{
3 # POST → ipfs-upload backend (writes file to /var/lib/ipfs/download/<path>
4 # and returns the CID). Anything else → the kubo gateway.
5 services.nginx.upstreams.ipfs-gateway.servers."127.0.0.1:8089" = { };
6 services.nginx.upstreams.ipfs-upload.servers."127.0.0.1:8090" = { };
7 services.nginx.appendHttpConfig = ''
8 map $request_method $ipfs_lassul_upstream {
9 default ipfs-gateway;
10 POST ipfs-upload;
11 }
12 '';
13
14 services.nginx.virtualHosts."ipfs.lassul.us" = {
15 forceSSL = true;
16 enableACME = true;
17 locations."/" = {
18 proxyPass = "http://$ipfs_lassul_upstream";
19 recommendedProxySettings = true;
20 extraConfig = ''
21 client_max_body_size 0;
22 proxy_request_buffering off;
23 proxy_read_timeout 1h;
24 proxy_send_timeout 1h;
25 '';
26 };
27 };
28 services.nginx.virtualHosts."flix.lassul.us" = {
29 forceSSL = true;
30 enableACME = true;
31 locations."/" = {
32 proxyPass = "http://yellow.r:8096";
33 proxyWebsockets = true;
34 recommendedProxySettings = true;
35 };
36 };
37 services.nginx.virtualHosts."flex.lassul.us" = {
38 forceSSL = true;
39 enableACME = true;
40 locations."/" = {
41 proxyPass = "http://radar.r:7878";
42 proxyWebsockets = true;
43 recommendedProxySettings = true;
44 extraConfig = ''
45 auth_basic "Restricted Content";
46 auth_basic_user_file ${pkgs.writeText "flix-user-pass" ''
47 krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0
48 ''};
49 '';
50 };
51 };
52 services.nginx.virtualHosts."flux.lassul.us" = {
53 forceSSL = true;
54 enableACME = true;
55 locations."/" = {
56 proxyPass = "http://sonar.r:8989";
57 proxyWebsockets = true;
58 recommendedProxySettings = true;
59 extraConfig = ''
60 auth_basic "Restricted Content";
61 auth_basic_user_file ${pkgs.writeText "flix-user-pass" ''
62 krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0
63 ''};
64 '';
65 };
66 };
67 services.nginx.virtualHosts."flax.lassul.us" = {
68 forceSSL = true;
69 enableACME = true;
70 locations."/" = {
71 proxyPass = "http://yellow.r";
72 proxyWebsockets = true;
73 recommendedProxySettings = true;
74 extraConfig = ''
75 auth_basic "Restricted Content";
76 auth_basic_user_file ${pkgs.writeText "flix-user-pass" ''
77 krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0
78 ''};
79 '';
80 };
81 };
82 services.nginx.virtualHosts."flox.lassul.us" = {
83 forceSSL = true;
84 enableACME = true;
85 locations."/" = {
86 proxyPass = "http://yellow.r:5055";
87 proxyWebsockets = true;
88 recommendedProxySettings = true;
89 };
90 };
91}