Unverified Commit e329dc70 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 9b69394f 672efa69
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -72,6 +72,22 @@

- The [services.caddy.acmeCA](#opt-services.caddy.acmeCA) option now defaults to `null` instead of `"https://acme-v02.api.letsencrypt.org/directory"`, to use all of Caddy's default ACME CAs and enable Caddy's automatic issuer fallback feature by default, as recommended by upstream.

- The default priorities of [`services.nextcloud.phpOptions`](#opt-services.nextcloud.phpOptions) have changed. This means that e.g.
  `services.nextcloud.phpOptions."opcache.interned_strings_buffer" = "23";` doesn't discard all of the other defaults from this option
  anymore. The attribute values of `phpOptions` are still defaults, these can be overridden as shown here.

  To override all of the options (including including `upload_max_filesize`, `post_max_size`
  and `memory_limit` which all point to [`services.nextcloud.maxUploadSize`](#opt-services.nextcloud.maxUploadSize)
  by default) can be done like this:

  ```nix
  {
    services.nextcloud.phpOptions = lib.mkForce {
      /* ... */
    };
  }
  ```

- `php80` is no longer supported due to upstream not supporting this version anymore.

- PHP now defaults to PHP 8.2, updated from 8.1.
+53 −24
Original line number Diff line number Diff line
@@ -8,6 +8,21 @@ let

  jsonFormat = pkgs.formats.json {};

  defaultPHPSettings = {
    short_open_tag = "Off";
    expose_php = "Off";
    error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT";
    display_errors = "stderr";
    "opcache.enable_cli" = "1";
    "opcache.interned_strings_buffer" = "8";
    "opcache.max_accelerated_files" = "10000";
    "opcache.memory_consumption" = "128";
    "opcache.revalidate_freq" = "1";
    "opcache.fast_shutdown" = "1";
    "openssl.cafile" = "/etc/ssl/certs/ca-certificates.crt";
    catch_workers_output = "yes";
  };

  inherit (cfg) datadir;

  phpPackage = cfg.phpPackage.buildEnv {
@@ -26,22 +41,13 @@ let
        ++ optional cfg.caching.memcached memcached
      )
      ++ cfg.phpExtraExtensions all; # Enabled by user
    extraConfig = toKeyValue phpOptions;
    extraConfig = toKeyValue cfg.phpOptions;
  };

  toKeyValue = generators.toKeyValue {
    mkKeyValue = generators.mkKeyValueDefault {} " = ";
  };

  phpOptions = {
    upload_max_filesize = cfg.maxUploadSize;
    post_max_size = cfg.maxUploadSize;
    memory_limit = cfg.maxUploadSize;
  } // cfg.phpOptions
    // optionalAttrs cfg.caching.apcu {
      "apc.enable_cli" = "1";
    };

  occ = pkgs.writeScriptBin "nextcloud-occ" ''
    #! ${pkgs.runtimeShell}
    cd ${cfg.package}
@@ -263,22 +269,33 @@ in {

    phpOptions = mkOption {
      type = types.attrsOf types.str;
      default = {
        short_open_tag = "Off";
        expose_php = "Off";
        error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT";
        display_errors = "stderr";
        "opcache.enable_cli" = "1";
        "opcache.interned_strings_buffer" = "8";
        "opcache.max_accelerated_files" = "10000";
        "opcache.memory_consumption" = "128";
        "opcache.revalidate_freq" = "1";
        "opcache.fast_shutdown" = "1";
        "openssl.cafile" = "/etc/ssl/certs/ca-certificates.crt";
        catch_workers_output = "yes";
      };
      defaultText = literalExpression (generators.toPretty { } defaultPHPSettings);
      description = lib.mdDoc ''
        Options for PHP's php.ini file for nextcloud.

        Please note that this option is _additive_ on purpose while the
        attribute values inside the default are option defaults: that means that

        ```nix
        {
          services.nextcloud.phpOptions."opcache.interned_strings_buffer" = "23";
        }
        ```

        will override the `php.ini` option `opcache.interned_strings_buffer` without
        discarding the rest of the defaults.

        Overriding all of `phpOptions` (including `upload_max_filesize`, `post_max_size`
        and `memory_limit` which all point to [](#opt-services.nextcloud.maxUploadSize)
        by default) can be done like this:

        ```nix
        {
          services.nextcloud.phpOptions = lib.mkForce {
            /* ... */
          };
        }
        ```
      '';
    };

@@ -750,6 +767,18 @@ in {
      services.nextcloud.phpPackage =
        if versionOlder cfg.package.version "26" then pkgs.php81
        else pkgs.php82;

      services.nextcloud.phpOptions = mkMerge [
        (mapAttrs (const mkOptionDefault) defaultPHPSettings)
        {
          upload_max_filesize = cfg.maxUploadSize;
          post_max_size = cfg.maxUploadSize;
          memory_limit = cfg.maxUploadSize;
        }
        (mkIf cfg.caching.apcu {
          "apc.enable_cli" = "1";
        })
      ];
    }

    { assertions = [
+5 −5
Original line number Diff line number Diff line
@@ -54,12 +54,12 @@
        version = "2023-05-19";
      };
      ungoogled-patches = {
        rev = "115.0.5790.110-1";
        sha256 = "1jahy4jl5bnnzl6433hln0dj3b39v5zqd90n8zf7ss45wqrff91b";
        rev = "115.0.5790.170-1";
        sha256 = "0vk82jacadb4id16596s4751j4idq6903w6sl2s7cj4ppxd6pyf1";
      };
    };
    sha256 = "0wgp44qnvmdqf2kk870ndm51rcvar36li2qq632ay4n8gfpbrm79";
    sha256bin64 = "1w2jl92x78s4vxv4p1imkz7qaq51yvs0wiz2bclbjz0hjlw9akr3";
    version = "115.0.5790.110";
    sha256 = "1h3j24ihn76qkvckzg703pm1jsh6nbkc48n2zx06kia8wz96567z";
    sha256bin64 = "04jklk2zwkyy8i70v9nk7nw35w2g9pyxdw9w3sn9mddgbjjph5z9";
    version = "115.0.5790.170";
  };
}
+2 −2
Original line number Diff line number Diff line
@@ -2,12 +2,12 @@

python3.pkgs.buildPythonApplication rec {
  pname = "fava";
  version = "1.25";
  version = "1.25.1";
  format = "pyproject";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-3SxFvvYZupYOsQU/n+zq3hamyWaaN9guoiV8km9mHjM=";
    hash = "sha256-RJbPqj6hXqf8D5G8zrg0BAYfxSRDfUgRNGwX+LZlPPY=";
  };

  nativeBuildInputs = with python3.pkgs; [ setuptools-scm ];
+5 −4
Original line number Diff line number Diff line
@@ -13,24 +13,25 @@

rustPlatform.buildRustPackage rec {
  pname = "gitoxide";
  version = "0.27.0";
  version = "0.28.0";

  src = fetchFromGitHub {
    owner = "Byron";
    repo = "gitoxide";
    rev = "v${version}";
    sha256 = "sha256-L5x27rJ9Y3K886OlTvCXV2LY+6L/f6vokCbgrWPCiHY=";
    hash = "sha256-7iJx7kE606jeaokROmOSoh0egCQUgYwvg8BAA3y1BGs=";
  };

  cargoHash = "sha256-YEHHu9PJ5aJvWUaTXCNKEaV/Rd8lP6Wub/CFJCBykHU=";
  cargoHash = "sha256-zChqIA/KuS1aBs/g1tlymGvvJeljKMMCODijPhQYy40=";

  nativeBuildInputs = [ cmake pkg-config ];

  buildInputs = [ curl ] ++ (if stdenv.isDarwin
    then [ libiconv Security SystemConfiguration ]
    else [ openssl ]);

  # Needed to get openssl-sys to use pkg-config.
  OPENSSL_NO_VENDOR = 1;
  env.OPENSSL_NO_VENDOR = 1;

  meta = with lib; {
    description = "A command-line application for interacting with git repositories";
Loading