summaryrefslogtreecommitdiff
path: root/deployment/services/web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/services/web.scm')
-rw-r--r--deployment/services/web.scm78
1 files changed, 4 insertions, 74 deletions
diff --git a/deployment/services/web.scm b/deployment/services/web.scm
index 52d8385..fe03e90 100644
--- a/deployment/services/web.scm
+++ b/deployment/services/web.scm
@@ -3,36 +3,21 @@
(define-module (deployment services web)
#:export (aisaka-certbot-service
- aisaka-cgit-service
- aisaka-nginx-service)
+ aisaka-nginx-service
+ nginx-location-well-known
+ nginx-service-type*)
#:use-module (gnu services)
#:use-module (gnu services web)
#:use-module (guix gexp)
#:use-module ((gnu packages matrix)
#:prefix gnu:packages:matrix:)
- #:use-module ((gnu packages version-control)
- #:prefix gnu:packages:version-control:)
#:use-module ((gnu services certbot)
#:prefix gnu:services:certbot:)
- #:use-module ((gnu services cgit)
- #:prefix gnu:services:cgit:)
- #:use-module ((gnu services version-control)
- #:prefix gnu:services:version-control:)
#:use-module ((gnu system shadow)
#:prefix gnu:system:shadow:)
#:use-module ((sovereign system accounts)
#:prefix sovereign:system:accounts:))
-(define cgit-repository-configuration
- (gnu:services:cgit:repository-cgit-configuration
- (hide? #t)
- (path "/srv/git/marek/packages")))
-
-(define git-http-configuration
- (gnu:services:version-control:git-http-configuration
- (git-root "/var/lib/gitolite/repositories")
- (uri-path "/git")))
-
(define nginx-accounts
(let
((accounts- (list sovereign:system:accounts:nginx-group
@@ -60,15 +45,6 @@
(extensions (map extend-account
nginx-extensions-)))))
-(define nginx-location-cgit
- (nginx-location-configuration
- (body (list "fastcgi_param HTTP_HOST $server_name ;"
- "fastcgi_param PATH_INFO $uri ;"
- "fastcgi_param QUERY_STRING $args ;"
- "fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi ;"
- "fastcgi_pass 127.0.0.1:9000 ;"))
- (uri "@cgit")))
-
(define nginx-location-proxy-guix
(nginx-location-configuration
(body (list "proxy_pass http://localhost:5232/ ;"
@@ -117,20 +93,6 @@
"add_header Access-Control-Allow-Origin * ;"))
(uri "/.well-known/matrix/client")))
-(define nginx-server-cgit
- (let
- ((git-http- (gnu:services:version-control:git-http-nginx-location-configuration git-http-configuration)))
- (nginx-server-configuration
- (locations (list git-http-
- nginx-location-cgit
- nginx-location-well-known))
- (listen (list "192.168.10.2:443 ssl"))
- (root gnu:packages:version-control:cgit)
- (server-name (list "git.marekpasnikowski.pl"))
- (ssl-certificate "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem")
- (ssl-certificate-key "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem")
- (try-files (list "$uri" "@cgit")))))
-
(define nginx-server-guix
(nginx-server-configuration
(locations (list nginx-location-proxy-guix))
@@ -278,36 +240,4 @@
(service certbot-type
certbot-configuration))
-(define nginx-extension-of-cgit
- (service-extension nginx-service-type*
- gnu:services:cgit:cgit-configuration-nginx-config))
-
-(define (extend-cgit extension)
- (let*
- ((extension-target- (service-extension-target extension))
- (nginx-service-type?- (eq? extension-target-
- nginx-service-type)))
- (if nginx-service-type?-
- nginx-extension-of-cgit
- extension)))
-
-(define cgit-type
- (let
- ((cgit-extensions- (service-type-extensions gnu:services:cgit:cgit-service-type)))
- (service-type
- (inherit gnu:services:cgit:cgit-service-type)
- (extensions (map extend-cgit
- cgit-extensions-)))))
-
-(define cgit-configuration
- (gnu:services:cgit:cgit-configuration
- (nginx (list nginx-server-cgit))
- (repositories (list cgit-repository-configuration))
- (project-list (list "deployment.git"
- "nonguix.git"
- "sovereign.git"))
- (repository-directory "/var/lib/gitolite/repositories")))
-
-(define-public aisaka-cgit-service
- (service cgit-type
- cgit-configuration))
+;;; EOF