git.iko.soy/typeable/nixpkgs
on master help sign in
gitlab module: update documentation
commit8a8971788c47f4b2f5173cd5b71082fdfd79bf49 authorFranz Pletz <fpletz@fnordicwalking.de> dateThu 4 Aug 2016, 02:23 (10 years ago) parentd8fd066
1 file changed+25−24
nixos/modules/services/misc/gitlab.xml+25−24
nixos/modules/services/misc/gitlab.xml+25−24
@@ -14,29 +14,22 @@
1414<literal>/run/gitlab/gitlab-workhorse.socket</literal>. You need to configure a
1515webserver to proxy HTTP requests to the socket.</para>
1616
17−<para>For instance, this could be used for Nginx:
17+<para>For instance, the following configuration could be used to use nginx as
18+ frontend proxy:
1819
1920<programlisting>
20−services.nginx.httpConfig = ''
21− server {
22− server_name git.example.com;
23− listen 443 ssl spdy;
24− listen [::]:443 ssl spdy;
25−
26− ssl_certificate /var/lib/acme/git.example.com/fullchain.pem;
27− ssl_certificate_key /var/lib/acme/git.example.com/key.pem;
28−
29− location / {
30− proxy_http_version 1.1;
31− proxy_set_header Host $http_host;
32− proxy_set_header X-Real-IP $remote_addr;
33− proxy_set_header X-Forwarded-Ssl on;
34− proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
35− proxy_set_header X-Forwarded-Proto $scheme;
36−
37− proxy_pass http://unix:/run/gitlab/gitlab-workhorse.socket;
38− }
39− }
21+ services.nginx = {
22+ enable = true;
23+ recommendedGzipSettings = true;
24+ recommendedOptimisation = true;
25+ recommendedProxySettings = true;
26+ recommendedTlsSettings = true;
27+ virtualHosts."git.example.com" = {
28+ enableACME = true;
29+ forceSSL = true;
30+ locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
31+ };
32+ };
4033'';
4134</programlisting>
4235</para>
@@ -49,10 +42,10 @@ services.nginx.httpConfig = ''
4942both services. In the case of PostgreSQL, a database and a role will be created.
5043</para>
5144
52−<para>The default state dir is /var/gitlab/state. This is where all data like
53−the repositories and uploads will be stored.</para>
45+<para>The default state dir is <literal>/var/gitlab/state</literal>. This is where
46+all data like the repositories and uploads will be stored.</para>
5447
55−<para>A basic configuration could look like this:
48+<para>A basic configuration with some custom settings could look like this:
5649
5750<programlisting>
5851services.gitlab = {
@@ -64,8 +57,16 @@ services.gitlab = {
6457 port = 443;
6558 user = "git";
6659 group = "git";
60+ smtp = {
61+ enable = true;
62+ address = "localhost";
63+ port = 25;
64+ };
6765 extraConfig = {
6866 gitlab = {
67+ email_from = "gitlab-no-reply@example.com";
68+ email_display_name = "Example GitLab";
69+ email_reply_to = "gitlab-no-reply@example.com";
6970 default_projects_features = { builds = false; };
7071 };
7172 };