Improve the certificateScheme number deprecation warning message

This commit is contained in:
Antoine Eiche 2023-06-06 23:24:53 +02:00 committed by lewo
parent 7e09d8f537
commit 290d00f6db
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,7 @@ in
certificateScheme = let certificateScheme = let
schemes = [ "manual" "selfsigned" "acme-nginx" "acme" ]; schemes = [ "manual" "selfsigned" "acme-nginx" "acme" ];
translate = i: warn "setting mailserver.certificateScheme by number is deprecated, please use names instead" translate = i: warn "Setting mailserver.certificateScheme by number is deprecated, please use names instead: 'mailserver.certificateScheme = ${builtins.toString i}' can be replaced by 'mailserver.certificateScheme = \"${(builtins.elemAt schemes (i - 1))}\"'."
(builtins.elemAt schemes (i - 1)); (builtins.elemAt schemes (i - 1));
in mkOption { in mkOption {
type = with types; coercedTo (enum [ 1 2 3 ]) translate (enum schemes); type = with types; coercedTo (enum [ 1 2 3 ]) translate (enum schemes);