nixos/gitlab: Change default SMTP port, enable postfix only if used

Change the default SMTP port to `25`, to better match the default
address `localhost`. This gets rid of some error outputs in the test,
where it fails to connect to localhost:465.

Also, don't enable postfix by default unless it's actually useful to
us.
wip/yesman
talyz 3 years ago
parent f8ab43ef7b
commit 2b3800b9c7
No known key found for this signature in database
GPG Key ID: 2DED2151F4671A2B
  1. 7
      nixos/doc/manual/release-notes/rl-2105.xml
  2. 4
      nixos/modules/services/misc/gitlab.nix

@ -523,6 +523,13 @@ self: super:
as an hardware RNG, as it will automatically run the krngd task to periodically collect random
data from the device and mix it into the kernel's RNG.
</para>
<para>
The default SMTP port for GitLab has been changed to
<literal>25</literal> from its previous default of
<literal>465</literal>. If you depended on this default, you
should now set the <xref linkend="opt-services.gitlab.smtp.port" />
option.
</para>
</listitem>
</itemizedlist>
</section>

@ -424,7 +424,7 @@ in {
port = mkOption {
type = types.int;
default = 465;
default = 25;
description = "Port of the SMTP server for Gitlab.";
};
@ -684,7 +684,7 @@ in {
};
# Use postfix to send out mails.
services.postfix.enable = mkDefault true;
services.postfix.enable = mkDefault (cfg.smtp.enable && cfg.smtp.address == "localhost");
users.users.${cfg.user} =
{ group = cfg.group;

Loading…
Cancel
Save