From 8ca7ec7324aec3e7059c7168efc8845fbb5b0dd9 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 16 Sep 2023 11:27:33 +0200 Subject: [PATCH] hosts/amahl: enable hidden HTTP service --- hosts/amahl/system.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hosts/amahl/system.scm b/hosts/amahl/system.scm index ddfc731..da8b07e 100644 --- a/hosts/amahl/system.scm +++ b/hosts/amahl/system.scm @@ -76,11 +76,24 @@ (service dhcp-client-service-type (dhcp-client-configuration (interfaces '("eth0")))) + (service tor-service-type + (tor-configuration + (hidden-services + (list + (tor-onion-service-configuration + (name "nginx") + (mapping '((80 "127.0.0.1:8080")))))))) + (service nginx-service-type (nginx-configuration (extra-content "autoindex on;") (server-blocks - (list (nginx-server-configuration + (list + (nginx-server-configuration + (listen '("127.0.0.1:8080")) + (server-name (list "*.onion")) + (root (string-append "/srv/http/" domain))) + (nginx-server-configuration (listen '("443 ssl")) (server-name (list domain)) (ssl-certificate