Unverified Commit 095c5ad3 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

dovecot: remove hard coding path to module dir (#387642)

parents b580f9b5 6f9f9833
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -556,6 +556,10 @@

- For matrix homeserver Synapse we are now following the upstream recommendation to enable jemalloc as the memory allocator by default.

- In `dovecot` package removed hard coding path to module directory.

- `services.dovecot2.modules` have been removed, now need to use `environment.systemPackages` to load additional Dovecot modules.

- `services.kmonad` now creates a determinate symlink (in `/dev/input/by-id/`) to each of KMonad virtual devices.

- `services.gitea` now supports CAPTCHA usage through the `services.gitea.captcha` variable.
+6 −20
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ let
      base_dir = ${baseDir}
      protocols = ${concatStringsSep " " cfg.protocols}
      sendmail_path = /run/wrappers/bin/sendmail
      mail_plugin_dir = /run/current-system/sw/lib/dovecot/modules
      # defining mail_plugins must be done before the first protocol {} filter because of https://doc.dovecot.org/configuration_manual/config_file/config_file_syntax/#variable-expansion
      mail_plugins = $mail_plugins ${concatStringsSep " " cfg.mailPlugins.globally.enable}
    ''
@@ -207,13 +208,6 @@ let
    cfg.extraConfig
  ];

  modulesDir = pkgs.symlinkJoin {
    name = "dovecot-modules";
    paths = map (pkg: "${pkg}/lib/dovecot") (
      [ dovecotPkg ] ++ map (module: module.override { dovecot = dovecotPkg; }) cfg.modules
    );
  };

  mailboxConfig =
    mailbox:
    ''
@@ -280,6 +274,11 @@ in
{
  imports = [
    (mkRemovedOptionModule [ "services" "dovecot2" "package" ] "")
    (mkRemovedOptionModule [
      "services"
      "dovecot2"
      "modules"
    ] "Now need to use `environment.systemPackages` to load additional Dovecot modules")
    (mkRenamedOptionModule
      [ "services" "dovecot2" "sieveScripts" ]
      [ "services" "dovecot2" "sieve" "scripts" ]
@@ -409,17 +408,6 @@ in
        default = true;
      };

    modules = mkOption {
      type = types.listOf types.package;
      default = [ ];
      example = literalExpression "[ pkgs.dovecot_pigeonhole ]";
      description = ''
        Symlinks the contents of lib/dovecot of every given package into
        /etc/dovecot/modules. This will make the given modules available
        if a dovecot package with the module_dir patch applied is being used.
      '';
    };

    sslCACert = mkOption {
      type = types.nullOr types.str;
      default = null;
@@ -702,7 +690,6 @@ in
        ${cfg.mailGroup} = { };
      };

    environment.etc."dovecot/modules".source = modulesDir;
    environment.etc."dovecot/dovecot.conf".source = cfg.configFile;

    systemd.services.dovecot2 = {
@@ -712,7 +699,6 @@ in
      wantedBy = [ "multi-user.target" ];
      restartTriggers = [
        cfg.configFile
        modulesDir
      ];

      startLimitIntervalSec = 60; # 1 min
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {

  configureFlags = [
    "--with-dovecot=${dovecot}/lib/dovecot"
    "--with-moduledir=$(out)/lib/dovecot"
    "--with-moduledir=${placeholder "out"}/lib/dovecot/modules"
  ];

  meta = with lib; {
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {

  configureFlags = [
    "--with-dovecot=${dovecot}/lib/dovecot"
    "--with-moduledir=$(out)/lib/dovecot"
    "--with-moduledir=${placeholder "out"}/lib/dovecot/modules"
  ];

  meta = with lib; {
+1 −1
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ stdenv.mkDerivation rec {

  configureFlags = [
    "--with-dovecot=${dovecot}/lib/dovecot"
    "--with-moduledir=${placeholder "out"}/lib/dovecot/modules"
    "--without-dovecot-install-dirs"
    "--with-moduledir=$(out)/lib/dovecot"
  ];

  enableParallelBuilding = true;
Loading