aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/gi/git-back
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/gi/git-back')
-rw-r--r--modules/by-name/gi/git-back/module.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/by-name/gi/git-back/module.nix b/modules/by-name/gi/git-back/module.nix
new file mode 100644
index 0000000..96f4913
--- /dev/null
+++ b/modules/by-name/gi/git-back/module.nix
@@ -0,0 +1,41 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.vhack.git-back;
+in {
+ options.vhack.git-back = {
+ enable = lib.mkEnableOption "Back integration into git-server";
+
+ domain = lib.mkOption {
+ type = lib.types.str;
+ description = "The domain where to deploy back";
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ vhack.back = {
+ enable = true;
+
+ user = "git";
+ group = "git";
+
+ settings = {
+ scan_path = "${config.services.gitolite.dataDir}/repositories";
+ project_list = "${config.services.gitolite.dataDir}/projects.list";
+ root_url = "https://${cfg.domain}";
+ };
+ };
+
+ services.nginx = {
+ enable = true;
+ virtualHosts."${cfg.domain}" = {
+ locations."/".proxyPass = "http://127.0.0.1:8000";
+
+ enableACME = true;
+ forceSSL = true;
+ };
+ };
+ };
+}