This allows for client-side caching.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
“expires” directives for /{packages,sources}.json.
This sends them as “Content-Encoding: gzip”, as a followup to
1123fd81ce.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations):
Remove “gunzip on” from /{packages,sources}.json.
* hydra/build-package-metadata.scm (write-json): Use
‘call-with-gzip-output-port’.
(main): Append “.gz” to JSON file names.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
“gzip_static” and “gunzip” directives on /packages.json and
/sources.json.
Previously, these two files were built as part of the web site's build
process.
* hydra/modules/sysadmin/web.scm (%package-metadata-directory)
(guix-web-site-mcron-jobs, guix-web-site-activation): New variables.
(guix-web-site-service-type): Add extensions using them.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations): Add
locations for /packages.json and /sources.json.
These are used in, e.g., Guix System's /etc/os-release and were
embarrassingly broken.
* hydra/modules/sysadmin/nginx.scm (guix.gnu.org-other-locations):
Handle the absence of a trailing ‘/’ in manual & cookbook URLs.
This factorizes the guix.gnu.org web site configuration.
The nginx.conf derivation for berlin.scm is left unchanged.
* hydra/nginx/berlin.scm (le, redirect, %tls-settings)
(guix.gnu.org-redirect-locations, languages-to-accept)
(guix.gnu.org-redirects-for-each-language)
(guix.gnu.org-other-locations, accept-languages): Move to...
* hydra/modules/sysadmin/nginx.scm: ... here.
* hydra/nginx/berlin.scm (%berlin-servers): Use
GUIX.GNU.ORG-NGINX-SERVER instead of the inline copy.