Unverified Commit 61d15c60 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

nixos/mailman: add option to expand the uwsgi settings

parent 6d674435
Loading
Loading
Loading
Loading
+22 −11
Original line number Diff line number Diff line
@@ -263,6 +263,15 @@ in {
      serve = {
        enable = lib.mkEnableOption "automatic nginx and uwsgi setup for mailman-web";

        uwsgiSettings = lib.mkOption {
          default = { };
          example = { uwsgi.buffer-size = 8192; };
          inherit (pkgs.formats.json {}) type;
          description = ''
            Extra configuration to merge into uwsgi config.
          '';
        };

        virtualRoot = lib.mkOption {
          default = "/";
          example = lib.literalExpression "/lists";
@@ -570,7 +579,8 @@ in {
      };

      mailman-uwsgi = lib.mkIf cfg.serve.enable (let
        uwsgiConfig.uwsgi = {
        uwsgiConfig = lib.recursiveUpdate {
          uwsgi = {
            type = "normal";
            plugins = ["python3"];
            home = webEnv;
@@ -582,6 +592,7 @@ in {
              mount = "${cfg.serve.virtualRoot}=mailman_web.wsgi:application";
              manage-script-name = true;
          });
        } cfg.serve.uwsgiSettings;
        uwsgiConfigFile = pkgs.writeText "uwsgi-mailman.json" (builtins.toJSON uwsgiConfig);
      in {
        wantedBy = ["multi-user.target"];