Add tor hidden service for the website
systems/hermes.scm
19 | 19 | (use-modules (gnu system)) | |
20 | 20 | (use-modules (gnu bootloader) (gnu bootloader grub)) | |
21 | 21 | (use-modules (gnu services dns)) | |
22 | + | (use-modules (gnu services networking)) | |
22 | 23 | (use-modules (gnu services web)) | |
23 | 24 | (use-modules (config certbot) (config dns) (config mail) (config network) (config os) | |
24 | - | (config web)) | |
25 | + | (config web)) | |
25 | 26 | ||
26 | 27 | ||
27 | 28 | ;; NOTE: this config contains out-of band files. | |
… | |||
76 | 77 | (append | |
77 | 78 | (list | |
78 | 79 | hermes-network-service | |
79 | - | (service nginx-service-type) | |
80 | + | (service tor-service-type) | |
81 | + | (tor-hidden-service "lepiller" | |
82 | + | '((22 "127.0.0.1:22") | |
83 | + | (80 "127.0.0.1:80"))) | |
84 | + | (service nginx-service-type | |
85 | + | (nginx-configuration | |
86 | + | (server-names-hash-bucket-size 128))) | |
80 | 87 | (service knot-service-type | |
81 | 88 | (knot-configuration | |
82 | 89 | (includes '("/etc/knot/secrets.conf")) | |
… | |||
86 | 93 | ipv4-reverse-master-zone | |
87 | 94 | ipv6-reverse-master-zone)))) | |
88 | 95 | (certbot-service `(("lepiller.eu" "www.lepiller.eu" "smtp.lepiller.eu"))) | |
96 | + | (simple-service 'tor-lepiller-http-server nginx-service-type | |
97 | + | (list (nginx-server-configuration | |
98 | + | (listen '("80" "[::]:80")) | |
99 | + | (server-name '("c25o7knygjm3m67jy27yuynvv4pkfi25naucscmh4ubq2ggiig3v57ad.onion")) | |
100 | + | (root "/srv/http/lepiller/public") | |
101 | + | (index '("index.$language_suffix.html" "index.html")) | |
102 | + | (try-files '("$uri.$language_suffix.html" "$uri" "$uri/" "=404")) | |
103 | + | (raw-content lepiller-policy)))) | |
89 | 104 | (simple-service 'lepiller-http-server nginx-service-type | |
90 | 105 | (list (nginx-server-configuration | |
91 | 106 | (ssl-certificate "/etc/letsencrypt/live/lepiller.eu/fullchain.pem") | |
… | |||
102 | 117 | (ssl-certificate-key "/etc/letsencrypt/live/lepiller.eu/privkey.pem") | |
103 | 118 | (listen '("443 ssl http2" "[::]:443 ssl http2")) | |
104 | 119 | (server-name '(default)) | |
105 | - | (root "/srv/http/default") | |
106 | - | (raw-content default-web-policy))))) | |
120 | + | (root "/srv/http/default") | |
121 | + | (raw-content default-web-policy))))) | |
107 | 122 | (lepiller-mail-services | |
108 | 123 | #:interface "ens18" | |
109 | 124 | #:domain "lepiller.eu") |