diff options
author | W. Kosior <koszko@koszko.org> | 2024-05-27 12:19:19 +0200 |
---|---|---|
committer | W. Kosior <koszko@koszko.org> | 2024-05-27 12:29:59 +0200 |
commit | ee8fac8ab8529e2d105c7e55c2c9b28aefd19b46 (patch) | |
tree | 7f7559d0ba91710624eb2c76a9765587595d8153 /vm.scm | |
parent | 2d05ae83321cdf8aa3abab6acdd69f331ef4b89a (diff) | |
download | AGH-ctf-course-2024-ee8fac8ab8529e2d105c7e55c2c9b28aefd19b46.tar.gz AGH-ctf-course-2024-ee8fac8ab8529e2d105c7e55c2c9b28aefd19b46.zip |
Diffstat (limited to 'vm.scm')
-rw-r--r-- | vm.scm | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -19,11 +19,12 @@ ((gnu packages tls) #:select (openssl)) ((gnu packages web) #:select (httpd)) ((gnu services) #:select - (activation-service-type modify-services service-extension + (activation-service-type modify-services service service-extension service-type simple-service)) ((gnu services base) #:select (guix-service-type guix-extension %base-services)) - ((gnu services mcron) #:prefix mc:) + ((gnu services desktop) #:select (elogind-service-type)) + ((gnu services mcron) #:select (cron-daemon-service-type)) ((gnu services networking) #:select (dhcp-client-service-type)) ((gnu services shepherd) #:select (shepherd-root-service-type shepherd-service)) @@ -131,9 +132,13 @@ Cantius, part of a CTF competition VM.") '(#o750 #o640 #o640))))) (prepend %services + (service elogind-service-type)) + +(prepend %services (simple-service 'gemini-main-server-directory activation-service-type #~(begin (false-if-exception (delete-file "/srv/gemini")) + (mkdir-p "/srv") (symlink #$(local-file (string-append %here "/gemini") #:recursive? #t) "/srv/gemini")))) @@ -176,8 +181,7 @@ Cantius, part of a CTF competition VM.") "proxy" "proxy_http" "rewrite" - "ssl" - "userdir")) + "ssl")) web:%default-httpd-modules)) (extra-config (list "\ @@ -197,7 +201,9 @@ Cantius, part of a CTF competition VM.") ServerAlias www.ctftilde.koszko.org ServerAdmin webmaster@ctftilde.koszko.org - UserDir /srv/http-users + RewriteEngine On + + RewriteRule \"^/~([^/]+)(.*)\" \"/srv/http-users/$1$2\" ProxyPassMatch ^/(([^~].*)?)$ http://127.0.0.1:8080/$1 ProxyPassReverse / http://127.0.0.1:8080/ @@ -212,9 +218,7 @@ Cantius, part of a CTF competition VM.") '(80 443)))) (prepend %services - (service mc:mcron-service-type - (mc:mcron-configuration - (/var-tabs? #t)))) + (service cron-daemon-service-type)) (prepend %services (service openssh-service-type |