nixos/gitlab: Gitlab -> GitLab
This commit is contained in:
@@ -265,7 +265,7 @@ in {
|
|||||||
type = types.str;
|
type = types.str;
|
||||||
default = "/var/gitlab/state";
|
default = "/var/gitlab/state";
|
||||||
description = ''
|
description = ''
|
||||||
Gitlab state directory. Configuration, repositories and
|
GitLab state directory. Configuration, repositories and
|
||||||
logs, among other things, are stored here.
|
logs, among other things, are stored here.
|
||||||
|
|
||||||
The directory will be created automatically if it doesn't
|
The directory will be created automatically if it doesn't
|
||||||
@@ -376,7 +376,7 @@ in {
|
|||||||
type = types.str;
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Gitlab database hostname. An empty string means <quote>use
|
GitLab database hostname. An empty string means <quote>use
|
||||||
local unix socket connection</quote>.
|
local unix socket connection</quote>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@@ -385,7 +385,7 @@ in {
|
|||||||
type = with types; nullOr path;
|
type = with types; nullOr path;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
File containing the Gitlab database user password.
|
File containing the GitLab database user password.
|
||||||
|
|
||||||
This should be a string, not a nix path, since nix paths are
|
This should be a string, not a nix path, since nix paths are
|
||||||
copied into the world-readable nix store.
|
copied into the world-readable nix store.
|
||||||
@@ -406,13 +406,13 @@ in {
|
|||||||
databaseName = mkOption {
|
databaseName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "gitlab";
|
default = "gitlab";
|
||||||
description = "Gitlab database name.";
|
description = "GitLab database name.";
|
||||||
};
|
};
|
||||||
|
|
||||||
databaseUsername = mkOption {
|
databaseUsername = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "gitlab";
|
default = "gitlab";
|
||||||
description = "Gitlab database user.";
|
description = "GitLab database user.";
|
||||||
};
|
};
|
||||||
|
|
||||||
databasePool = mkOption {
|
databasePool = mkOption {
|
||||||
@@ -456,14 +456,14 @@ in {
|
|||||||
host = mkOption {
|
host = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = config.networking.hostName;
|
default = config.networking.hostName;
|
||||||
description = "Gitlab host name. Used e.g. for copy-paste URLs.";
|
description = "GitLab host name. Used e.g. for copy-paste URLs.";
|
||||||
};
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 8080;
|
default = 8080;
|
||||||
description = ''
|
description = ''
|
||||||
Gitlab server port for copy-paste URLs, e.g. 80 or 443 if you're
|
GitLab server port for copy-paste URLs, e.g. 80 or 443 if you're
|
||||||
service over https.
|
service over https.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@@ -516,26 +516,26 @@ in {
|
|||||||
address = mkOption {
|
address = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "localhost";
|
default = "localhost";
|
||||||
description = "Address of the SMTP server for Gitlab.";
|
description = "Address of the SMTP server for GitLab.";
|
||||||
};
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 25;
|
default = 25;
|
||||||
description = "Port of the SMTP server for Gitlab.";
|
description = "Port of the SMTP server for GitLab.";
|
||||||
};
|
};
|
||||||
|
|
||||||
username = mkOption {
|
username = mkOption {
|
||||||
type = with types; nullOr str;
|
type = with types; nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Username of the SMTP server for Gitlab.";
|
description = "Username of the SMTP server for GitLab.";
|
||||||
};
|
};
|
||||||
|
|
||||||
passwordFile = mkOption {
|
passwordFile = mkOption {
|
||||||
type = types.nullOr types.path;
|
type = types.nullOr types.path;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
File containing the password of the SMTP server for Gitlab.
|
File containing the password of the SMTP server for GitLab.
|
||||||
|
|
||||||
This should be a string, not a nix path, since nix paths
|
This should be a string, not a nix path, since nix paths
|
||||||
are copied into the world-readable nix store.
|
are copied into the world-readable nix store.
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
version="5.0"
|
version="5.0"
|
||||||
xml:id="module-services-gitlab">
|
xml:id="module-services-gitlab">
|
||||||
<title>Gitlab</title>
|
<title>GitLab</title>
|
||||||
<para>
|
<para>
|
||||||
Gitlab is a feature-rich git hosting service.
|
GitLab is a feature-rich git hosting service.
|
||||||
</para>
|
</para>
|
||||||
<section xml:id="module-services-gitlab-prerequisites">
|
<section xml:id="module-services-gitlab-prerequisites">
|
||||||
<title>Prerequisites</title>
|
<title>Prerequisites</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The gitlab service exposes only an Unix socket at
|
The <literal>gitlab</literal> service exposes only an Unix socket at
|
||||||
<literal>/run/gitlab/gitlab-workhorse.socket</literal>. You need to
|
<literal>/run/gitlab/gitlab-workhorse.socket</literal>. You need to
|
||||||
configure a webserver to proxy HTTP requests to the socket.
|
configure a webserver to proxy HTTP requests to the socket.
|
||||||
</para>
|
</para>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<title>Configuring</title>
|
<title>Configuring</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Gitlab depends on both PostgreSQL and Redis and will automatically enable
|
GitLab depends on both PostgreSQL and Redis and will automatically enable
|
||||||
both services. In the case of PostgreSQL, a database and a role will be
|
both services. In the case of PostgreSQL, a database and a role will be
|
||||||
created.
|
created.
|
||||||
</para>
|
</para>
|
||||||
@@ -85,20 +85,20 @@ services.gitlab = {
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you're setting up a new Gitlab instance, generate new
|
If you're setting up a new GitLab instance, generate new
|
||||||
secrets. You for instance use <literal>tr -dc A-Za-z0-9 <
|
secrets. You for instance use <literal>tr -dc A-Za-z0-9 <
|
||||||
/dev/urandom | head -c 128 > /var/keys/gitlab/db</literal> to
|
/dev/urandom | head -c 128 > /var/keys/gitlab/db</literal> to
|
||||||
generate a new db secret. Make sure the files can be read by, and
|
generate a new db secret. Make sure the files can be read by, and
|
||||||
only by, the user specified by <link
|
only by, the user specified by <link
|
||||||
linkend="opt-services.gitlab.user">services.gitlab.user</link>. Gitlab
|
linkend="opt-services.gitlab.user">services.gitlab.user</link>. GitLab
|
||||||
encrypts sensitive data stored in the database. If you're restoring
|
encrypts sensitive data stored in the database. If you're restoring
|
||||||
an existing Gitlab instance, you must specify the secrets secret
|
an existing GitLab instance, you must specify the secrets secret
|
||||||
from <literal>config/secrets.yml</literal> located in your Gitlab
|
from <literal>config/secrets.yml</literal> located in your GitLab
|
||||||
state folder.
|
state folder.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When <literal>icoming_mail.enabled</literal> is set to <literal>true</literal>
|
When <literal>incoming_mail.enabled</literal> is set to <literal>true</literal>
|
||||||
in <link linkend="opt-services.gitlab.extraConfig">extraConfig</link> an additional
|
in <link linkend="opt-services.gitlab.extraConfig">extraConfig</link> an additional
|
||||||
service called <literal>gitlab-mailroom</literal> is enabled for fetching incoming mail.
|
service called <literal>gitlab-mailroom</literal> is enabled for fetching incoming mail.
|
||||||
</para>
|
</para>
|
||||||
@@ -113,13 +113,13 @@ services.gitlab = {
|
|||||||
<title>Maintenance</title>
|
<title>Maintenance</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can run Gitlab's rake tasks with <literal>gitlab-rake</literal> which
|
You can run GitLab's rake tasks with <literal>gitlab-rake</literal> which
|
||||||
will be available on the system when gitlab is enabled. You will have to run
|
will be available on the system when gitlab is enabled. You will have to run
|
||||||
the command as the user that you configured to run gitlab with.
|
the command as the user that you configured to run gitlab with.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For example, to backup a Gitlab instance:
|
For example, to backup a GitLab instance:
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>sudo -u git -H gitlab-rake gitlab:backup:create
|
<prompt>$ </prompt>sudo -u git -H gitlab-rake gitlab:backup:create
|
||||||
</screen>
|
</screen>
|
||||||
|
|||||||
Reference in New Issue
Block a user