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:
parent
a02b4af726
commit
ae1dada42f
|
@ -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" ];
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue