3
0
Fork 0
forked from mirrors/nixpkgs

nixos/gitlab: Support incoming mail

When incoming mails are enabled, an extra service is needed.
Closes #36125.
This commit is contained in:
Janne Heß 2020-07-18 16:35:37 +02:00
parent a02b4af726
commit ae1dada42f
No known key found for this signature in database
GPG key ID: 69165158F05265DF
2 changed files with 23 additions and 0 deletions

View file

@ -777,6 +777,23 @@ in {
};
};
systemd.services.gitlab-mailroom = mkIf (gitlabConfig.production.incoming_email.enabled or false) {
description = "GitLab incoming mail daemon";
after = [ "network.target" "redis.service" "gitlab.service" ]; # gitlab.service creates configs
wantedBy = [ "multi-user.target" ];
environment = gitlabEnv;
serviceConfig = {
Type = "simple";
TimeoutSec = "infinity";
Restart = "on-failure";
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.packages.gitlab.rubyEnv}/bin/bundle exec mail_room -c ${cfg.packages.gitlab}/share/gitlab/config.dist/mail_room.yml";
WorkingDirectory = gitlabEnv.HOME;
};
};
systemd.services.gitlab = {
after = [ "gitlab-workhorse.service" "gitaly.service" "network.target" "gitlab-postgresql.service" "redis.service" ];
requires = [ "gitlab-sidekiq.service" ];

View file

@ -97,6 +97,12 @@ services.gitlab = {
state folder.
</para>
<para>
When <literal>icoming_mail.enabled</literal> is set to <literal>true</literal>
in <link linkend="opt-services.gitlab.extraConfig">extraConfig</link> an additional
service called <literal>gitlab-mailroom</literal> is enabled for fetching incoming mail.
</para>
<para>
Refer to <xref linkend="ch-options" /> for all available configuration
options for the