diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-08-04 02:23:08 +0200 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2016-08-04 02:29:50 +0200 |
commit | 8a8971788c47f4b2f5173cd5b71082fdfd79bf49 (patch) | |
tree | fc39094902056d12a9c0f8525e45b4fac5752413 | |
parent | d8fd06641ac9b7ce131afd5eaa626d60c8645b21 (diff) | |
download | nixlib-8a8971788c47f4b2f5173cd5b71082fdfd79bf49.tar nixlib-8a8971788c47f4b2f5173cd5b71082fdfd79bf49.tar.gz nixlib-8a8971788c47f4b2f5173cd5b71082fdfd79bf49.tar.bz2 nixlib-8a8971788c47f4b2f5173cd5b71082fdfd79bf49.tar.lz nixlib-8a8971788c47f4b2f5173cd5b71082fdfd79bf49.tar.xz nixlib-8a8971788c47f4b2f5173cd5b71082fdfd79bf49.tar.zst nixlib-8a8971788c47f4b2f5173cd5b71082fdfd79bf49.zip |
gitlab module: update documentation
-rw-r--r-- | nixos/modules/services/misc/gitlab.xml | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/nixos/modules/services/misc/gitlab.xml b/nixos/modules/services/misc/gitlab.xml index 30bc39d25683..a8147b3a74f9 100644 --- a/nixos/modules/services/misc/gitlab.xml +++ b/nixos/modules/services/misc/gitlab.xml @@ -14,29 +14,22 @@ <literal>/run/gitlab/gitlab-workhorse.socket</literal>. You need to configure a webserver to proxy HTTP requests to the socket.</para> -<para>For instance, this could be used for Nginx: +<para>For instance, the following configuration could be used to use nginx as + frontend proxy: <programlisting> -services.nginx.httpConfig = '' - server { - server_name git.example.com; - listen 443 ssl spdy; - listen [::]:443 ssl spdy; - - ssl_certificate /var/lib/acme/git.example.com/fullchain.pem; - ssl_certificate_key /var/lib/acme/git.example.com/key.pem; - - location / { - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Ssl on; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_pass http://unix:/run/gitlab/gitlab-workhorse.socket; - } - } + services.nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts."git.example.com" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket"; + }; + }; ''; </programlisting> </para> @@ -49,10 +42,10 @@ services.nginx.httpConfig = '' both services. In the case of PostgreSQL, a database and a role will be created. </para> -<para>The default state dir is /var/gitlab/state. This is where all data like -the repositories and uploads will be stored.</para> +<para>The default state dir is <literal>/var/gitlab/state</literal>. This is where +all data like the repositories and uploads will be stored.</para> -<para>A basic configuration could look like this: +<para>A basic configuration with some custom settings could look like this: <programlisting> services.gitlab = { @@ -64,8 +57,16 @@ services.gitlab = { port = 443; user = "git"; group = "git"; + smtp = { + enable = true; + address = "localhost"; + port = 25; + }; extraConfig = { gitlab = { + email_from = "gitlab-no-reply@example.com"; + email_display_name = "Example GitLab"; + email_reply_to = "gitlab-no-reply@example.com"; default_projects_features = { builds = false; }; }; }; |