From a9d4cd5813adce1b696e595457344402a2ee14ce Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Fri, 27 Jul 2018 19:21:37 +0200 Subject: [PATCH] Add https-git --- .gitmodules | 12 ------------ hosts/hera/git.nix | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.gitmodules b/.gitmodules index d9753d11..6885231b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,3 @@ -[submodule "system/modules/cdarknet/nixdark"] - path = system/modules/cdarknet/nixdark - url = git@git.darmstadt.ccc.de:cdark.net/nixdark -[submodule "system/modules/cdarknet/hosts"] - path = system/modules/cdarknet/hosts - url = git@git.darmstadt.ccc.de:cdark.net/hosts -[submodule "home-common/rofi/zzzfoo"] - path = home-common/rofi/zzzfoo - url = https://github.com/andersju/zzzfoo.git -[submodule "home-common/graphical/rofi/zzzfoo"] - path = home-common/graphical/rofi/zzzfoo - url = https://github.com/andersju/zzzfoo.git [submodule "modules/cdarknet/hosts"] path = system/modules/cdarknet/hosts url = git@git.darmstadt.ccc.de:cdark.net/hosts diff --git a/hosts/hera/git.nix b/hosts/hera/git.nix index 8a3f9a34..dd7a006b 100644 --- a/hosts/hera/git.nix +++ b/hosts/hera/git.nix @@ -23,12 +23,37 @@ in { }; inherit (config.networking) nameservers; defaultGateway6 = { address = config.m-0.hosts.hera-intern; interface = "eth0"; }; + firewall.allowedTCPPorts = [ 80 443 ]; }; environment.systemPackages = [ pkgs.git ]; + services = { sshd.enable = true; + fcgiwrap.enable = true; + nginx = { + enable = true; + virtualHosts."git.m-0.eu" = { + forceSSL = true; + enableACME = true; + default = true; + locations = { + "~ (/.*)" = { + extraConfig = '' + # fcgiwrap is set up to listen on this host:port + fastcgi_pass unix:/run/fcgiwrap.sock; + include ${pkgs.nginx}/conf/fastcgi_params; + fastcgi_param SCRIPT_FILENAME ${pkgs.git}/bin/git-http-backend; + # export all repositories under GIT_PROJECT_ROOT + fastcgi_param GIT_HTTP_EXPORT_ALL ""; + fastcgi_param GIT_PROJECT_ROOT /home/git; + fastcgi_param PATH_INFO $1; + ''; + }; + }; + }; + }; }; }; };