summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-14 09:51:16 +0100
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-14 09:51:16 +0100
commit56b39ebd307f4447a5286777c4f8474735d3bd16 (patch)
tree902fbc86c2ecd311b81aa7261bee415a3b7b102c
parent2f2fc8c847a2ae24248bd874b5d1c75610c851cf (diff)
parenta95671ead58b4f4fdc49234b41a621306ac92778 (diff)
Merge branch 'radicale'
The most important goal of synchronization with my phone is achieved.
-rw-r--r--izumi.org37
-rw-r--r--system-configuration.scm37
2 files changed, 70 insertions, 4 deletions
diff --git a/izumi.org b/izumi.org
index c757621..2faf761 100644
--- a/izumi.org
+++ b/izumi.org
@@ -553,7 +553,8 @@
( domains
( list
"marekpasnikowski.pl"
- "git.marekpasnikowski.pl" ) ) ) ) )
+ "git.marekpasnikowski.pl"
+ "radicale.marekpasnikowski.pl" ) ) ) ) )
( email certbot-mail )
( webroot "/srv/www/marek/marekpasnikowski.pl" ) ) )
( service cgit-service-type
@@ -598,6 +599,7 @@
( nginx-configuration
( server-blocks
( list
+ ;; Top-Level
( nginx-server-configuration
( locations
( list
@@ -611,8 +613,39 @@
( ssl-certificate
"/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" )
( ssl-certificate-key
- "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) ) ) ) ) )
+ "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) )
+ ;; Radicale
+ ( nginx-server-configuration
+ ( locations
+ ( list
+ ( nginx-location-configuration
+ ( body
+ ( list
+ "proxy_pass http://localhost:5232/ ;"
+ "proxy_set_header X-Script-Name \"\" ;"
+ "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;"
+ "proxy_set_header Host $http_host ;"
+ "proxy_pass_header Authorization ;" ) )
+ ( uri "/" ) )
+ ( nginx-location-configuration
+ ( body
+ ( list "root /srv/www/marek/marekpasnikowski.pl ;" ) )
+ ( uri "/.well-known" ) ) ) )
+ ( listen ( list "192.168.10.2:443 ssl" ) )
+ ( server-name ( list "radicale.marekpasnikowski.pl" ) ) ) ) ) ) )
( service openssh-service-type )
+ ( service radicale-service-type
+ ( radicale-configuration
+ ( config-file
+ ( mixed-text-file
+ "radicale.conf"
+ "[auth]\n"
+ "type = htpasswd\n"
+ "htpasswd_filename = " radicale-keys "\n"
+ "htpasswd_encryption = plain\n"
+ "\n"
+ "[server]\n"
+ "hosts = localhost:5232\n" ) ) ) )
( simple-service 'base-profile profile-service-type
( append %base-packages
( list
diff --git a/system-configuration.scm b/system-configuration.scm
index dd24d9e..b30e48c 100644
--- a/system-configuration.scm
+++ b/system-configuration.scm
@@ -543,7 +543,8 @@
( domains
( list
"marekpasnikowski.pl"
- "git.marekpasnikowski.pl" ) ) ) ) )
+ "git.marekpasnikowski.pl"
+ "radicale.marekpasnikowski.pl" ) ) ) ) )
( email certbot-mail )
( webroot "/srv/www/marek/marekpasnikowski.pl" ) ) )
( service cgit-service-type
@@ -588,6 +589,7 @@
( nginx-configuration
( server-blocks
( list
+ ;; Top-Level
( nginx-server-configuration
( locations
( list
@@ -601,8 +603,39 @@
( ssl-certificate
"/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" )
( ssl-certificate-key
- "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) ) ) ) ) )
+ "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) )
+ ;; Radicale
+ ( nginx-server-configuration
+ ( locations
+ ( list
+ ( nginx-location-configuration
+ ( body
+ ( list
+ "proxy_pass http://localhost:5232/ ;"
+ "proxy_set_header X-Script-Name \"\" ;"
+ "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;"
+ "proxy_set_header Host $http_host ;"
+ "proxy_pass_header Authorization ;" ) )
+ ( uri "/" ) )
+ ( nginx-location-configuration
+ ( body
+ ( list "root /srv/www/marek/marekpasnikowski.pl ;" ) )
+ ( uri "/.well-known" ) ) ) )
+ ( listen ( list "192.168.10.2:443 ssl" ) )
+ ( server-name ( list "radicale.marekpasnikowski.pl" ) ) ) ) ) ) )
( service openssh-service-type )
+ ( service radicale-service-type
+ ( radicale-configuration
+ ( config-file
+ ( mixed-text-file
+ "radicale.conf"
+ "[auth]\n"
+ "type = htpasswd\n"
+ "htpasswd_filename = " radicale-keys "\n"
+ "htpasswd_encryption = plain\n"
+ "\n"
+ "[server]\n"
+ "hosts = localhost:5232\n" ) ) ) )
( simple-service 'base-profile profile-service-type
( append %base-packages
( list