diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-07 10:39:32 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-07 10:46:28 +0200 |
commit | fe7eb4c36dc64616b0c18683fc2f3c941bbb0c81 (patch) | |
tree | 39e25184999a6ee4b1a4e8e75796f190d86d4ab2 /modules/by-name/gi | |
parent | pkgs/back: Remove (diff) | |
download | nixos-server-fe7eb4c36dc64616b0c18683fc2f3c941bbb0c81.zip |
modules/git-back: Init with the out-of-tree back
Diffstat (limited to 'modules/by-name/gi')
-rw-r--r-- | modules/by-name/gi/git-back/module.nix | 41 |
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; + }; + }; + }; +} |