Commit a6a9bb97 authored by Izorkin's avatar Izorkin
Browse files

dovecot: remove hard coding path to module dir

parent 0b4327ed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -559,6 +559,8 @@

- 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.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.
+3 −13
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:
    ''
@@ -414,9 +408,7 @@ in
      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.
        Load extended modules.
      '';
    };

@@ -702,7 +694,6 @@ in
        ${cfg.mailGroup} = { };
      };

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

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

      startLimitIntervalSec = 60; # 1 min
@@ -768,7 +758,7 @@ in
        '';
    };

    environment.systemPackages = [ dovecotPkg ];
    environment.systemPackages = [ dovecotPkg ] ++ cfg.modules;

    warnings = warnAboutExtraConfigCollisions;

+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