mailsystem: Add option extraSettingsFile to allow partial encryption of configuration
Some checks failed
Test / tests (push) Failing after 4m45s
Some checks failed
Test / tests (push) Failing after 4m45s
This commit is contained in:
parent
c1b19d6e33
commit
3a9b2c8b59
4 changed files with 28 additions and 10 deletions
|
|
@ -21,10 +21,16 @@ in rec {
|
|||
then ["acme-finished-${cfg.fqdn}.target"]
|
||||
else ["mailsystem-selfsigned-certificate.service"];
|
||||
|
||||
mailnixCfgFile = pkgs.writeText "mailnix-public.json" (builtins.toJSON {
|
||||
inherit (cfg) accounts domains;
|
||||
aliases = cfg.virtualAliases;
|
||||
});
|
||||
mailnixCmd = let
|
||||
mailnixCfgFile = pkgs.writeText "mailnix-public.json" (builtins.toJSON {
|
||||
inherit (cfg) accounts domains;
|
||||
aliases = cfg.virtualAliases;
|
||||
});
|
||||
extraCfgFile =
|
||||
if (cfg.extraSettingsFile != null)
|
||||
then cfg.extraSettingsFile
|
||||
else "";
|
||||
in "${pkgs.mailnix}/bin/mailnix ${extraCfgFile} ${mailnixCfgFile}";
|
||||
|
||||
dovecotDynamicStateDir = "/var/lib/dovecot";
|
||||
dovecotDynamicPasswdFile = "${dovecotDynamicStateDir}/passwd";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue