0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

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.
This commit is contained in:
talyz 2021-02-18 17:26:20 +01:00
parent f8ab43ef7b
commit 2b3800b9c7
No known key found for this signature in database
GPG key ID: 2DED2151F4671A2B
2 changed files with 9 additions and 2 deletions

View file

@ -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;