summaryrefslogtreecommitdiff
path: root/Biz/Cloud/Web.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Cloud/Web.nix')
-rw-r--r--Biz/Cloud/Web.nix60
1 files changed, 37 insertions, 23 deletions
diff --git a/Biz/Cloud/Web.nix b/Biz/Cloud/Web.nix
index cba8b2f..3ee6149 100644
--- a/Biz/Cloud/Web.nix
+++ b/Biz/Cloud/Web.nix
@@ -1,4 +1,4 @@
-{ config, ... }:
+{ config, lib, ... }:
let
rootDomain = config.networking.domain;
@@ -34,30 +34,44 @@ in
virtualHosts = {
${rootDomain} = {
- 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 = "/srv/www/$1$2";
- index = "index.html index.htm";
- extraConfig = ''
- autoindex on;
- '';
- };
forceSSL = true;
enableACME = true;
+ locations = {
+ "/" = {
+ root = "/srv/www/simatime.com";
+ extraConfig = ''
+ autoindex on;
+ '';
+ };
+ # serve /~$USER paths
+ "~ ^/~(.+?)(/.*)?$" = {
+ alias = "/srv/www/$1$2";
+ index = "index.html index.htm";
+ extraConfig = ''
+ autoindex on;
+ '';
+ };
+ };
+ cgit = {
+ enable = true;
+ location = "/git";
+ virtual-root = "/git";
+ css = "/git/cgit.css";
+ logo = "/git/cgit.png";
+ root-title = "ben's git repos";
+ clone-url = lib.strings.concatStringsSep " " [
+ "https://$HTTP_HOST/git/$CGIT_REPO_URL"
+ "git://$HTTP_HOST/$CGIT_REPO_URL"
+ "git@$HTTP_HOST:$CGIT_REPO_URL"
+ ];
+ include = [
+ # these depend on order, scan-path must come last
+ (builtins.toFile "cgitrc" ''
+ strict-export=git-daemon-export-ok
+ scan-path=/srv/git/repositories
+ '')
+ ];
+ };
};
"bsima.me" = {