Gitlab

From NixOS Wiki
Revision as of 08:38, 15 October 2022 by imported>Onny (Initial page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The GitLab web application offers git repository management, code reviews, issue tracking, activity feeds and wikis.

Installation

A minimal local installation of Gitlab might look like this

 services.gitlab = {
   enable = true;
   databasePasswordFile = pkgs.writeText "dbPassword" "test123";
   initialRootPasswordFile = pkgs.writeText "rootPassword" "test123";
   };
   secrets = {
     secretFile = pkgs.writeText "secret" "Aig5zaic";
     otpFile = pkgs.writeText "otpsecret" "Riew9mue";
     dbFile = pkgs.writeText "dbsecret" "we2quaeZ";
     jwsFile = pkgs.runCommand "oidcKeyBase" {} "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
   };
 };

services.nginx = {
  enable = true;
  recommendedProxySettings = true;
  virtualHosts = {
    localhost = {
      locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
    };
  };
};

services.openssh.enable = true;

systemd.services.gitlab-backup.environment.BACKUP = "dump";