From 288b2fa580edf3e7a4814422717b6055a5cf65ea Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 30 May 2023 12:31:11 +0800 Subject: [PATCH 1/2] maddy: 0.6.3 -> 0.7.0 Diff: https://github.com/foxcpp/maddy/compare/v0.6.3...v0.7.0 --- pkgs/servers/maddy/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/maddy/default.nix b/pkgs/servers/maddy/default.nix index d008bdf939ad..e48154bf02ea 100644 --- a/pkgs/servers/maddy/default.nix +++ b/pkgs/servers/maddy/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "maddy"; - version = "0.6.3"; + version = "0.7.0"; src = fetchFromGitHub { owner = "foxcpp"; repo = "maddy"; rev = "v${version}"; - sha256 = "sha256-vf+jkXerdwvQhtyiOObBRxh8sYMEcgXC5vNzm5wquBs="; + sha256 = "sha256-EMw07yTFP0aBSuGDWivB8amuxWLFHhYV6J9faTEW5z4="; }; - vendorSha256 = "sha256-10cLNl9jWYX8XIKQkCxJ+/ymZC1YJRHUJWZQhq7zeV4="; + vendorSha256 = "sha256-LyfkETZPkhJKN8CEivNp7Se4IBpzyAtmCM1xil4n2po="; tags = [ "libpam" ]; From 63f73b3295d165a6d60cc3322ec46b2c37f646d0 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 27 May 2023 15:49:05 +0200 Subject: [PATCH 2/2] nixos/maddy: change secrets option to accept a list of paths --- nixos/modules/services/mail/maddy.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/mail/maddy.nix b/nixos/modules/services/mail/maddy.nix index 701d57f18e0c..3b4a517fb859 100644 --- a/nixos/modules/services/mail/maddy.nix +++ b/nixos/modules/services/mail/maddy.nix @@ -335,12 +335,13 @@ in { }; secrets = lib.mkOption { - type = lib.types.path; + type = with types; listOf path; description = lib.mdDoc '' - A file containing the various secrets. Should be in the format + A list of files containing the various secrets. Should be in the format expected by systemd's `EnvironmentFile` directory. Secrets can be referenced in the format `{env:VAR}`. ''; + default = [ ]; }; }; @@ -379,7 +380,7 @@ in { User = cfg.user; Group = cfg.group; StateDirectory = [ "maddy" ]; - EnvironmentFile = lib.mkIf (cfg.secrets != null) "${cfg.secrets}"; + EnvironmentFile = cfg.secrets; }; restartTriggers = [ config.environment.etc."maddy/maddy.conf".source ]; wantedBy = [ "multi-user.target" ];