From 2b307499382691e3b4391b7accd9030cfadb0dd4 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 20 Apr 2021 17:22:32 -0400 Subject: Publish and archive some git repos Also adds a post-receive script that creates and publishes a git-archive of the repo at that commit. This way I can depend on my own nixpkgs fork. It took me forever but I finally figured out that I need --prefix in the git archive. I also switched to using gzip instead of xz because its faster, and I figured out how to get the sha256 that nix expects, so I can now just copy that and paste it into Biz/Bild/Sources.json. --- Biz/Cloud/Web.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'Biz/Cloud/Web.nix') diff --git a/Biz/Cloud/Web.nix b/Biz/Cloud/Web.nix index bc0d921..cba8b2f 100644 --- a/Biz/Cloud/Web.nix +++ b/Biz/Cloud/Web.nix @@ -12,10 +12,10 @@ in listen = "0.0.0.0:1965 [::]:1965"; ":tls" = { store = "/var/lib/gmnisrv"; }; "bsima.me" = { - "root" = "/www/ben/public"; + "root" = "/srv/www/ben"; }; "simatime.com" = { - "root" = "/www/simatime.com/public"; + "root" = "/srv/www/simatime.com"; "cgi" = "on"; }; }; @@ -34,11 +34,23 @@ in virtualHosts = { ${rootDomain} = { - locations."/".root = "/srv/www/"; + locations."/archive.*" = { + root = "/srv/www/simatime.com/archive"; + extraConfig = '' + autoindex on; + ''; + }; + + locations."/" = { + root = "/srv/www/simatime.com"; + extraConfig = '' + autoindex on; + ''; + }; # serve /~$USER paths locations."~ ^/~(.+?)(/.*)?$" = { - alias = "/www/$1/public$2"; + alias = "/srv/www/$1$2"; index = "index.html index.htm"; extraConfig = '' autoindex on; @@ -50,7 +62,7 @@ in "bsima.me" = { locations."/" = { - root = "/www/ben/public"; + root = "/srv/www/ben"; index = "index.html index.htm"; extraConfig = '' autoindex on; -- cgit v1.2.3