Unverified Commit afac5ae5 authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-nixos

parents 0b2fb900 6368eda6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -168,6 +168,10 @@

- the `xorg` package set has been deprecated, packages have moved to the top level.

- `python3Packages.buildPythonPackage` and `python3Packages.buildPythonApplication` now throw errors in the presence of `pytestFlagsArray`.
  Please use [`pytestFlags` and `(enabled|disabled)(TestPaths|Tests|TestMarks)`](#using-pytestcheckhook) instead.
  If modifying the Nix expression is not feasible, users can remediate the error by overriding `pytestFlagsArray` with `null` or `[ ]`.

- `python3Packages.pygame` has been been renamed to `python3Packages.pygame-original`, the attribute `python3Packages.pygame` will from python 3.14 default to the more actively maintained `python3Packages.pygame-ce`

- `fastly` has been updated to major version 14. For more information, you can check the [release notes](https://github.com/fastly/cli/releases/tag/v14.0.0)
+5 −0
Original line number Diff line number Diff line
@@ -182,6 +182,9 @@

- `services.uptime` has been removed because the package it relies on does not exist anymore in nixpkgs.

- `services.mattermost` now defaults to version 11, which has dropped support for MySQL in favor of Postgres. As a result, all support for MySQL has been removed from the module.
  See the [migration steps](https://docs.mattermost.com/deployment-guide/manual-postgres-migration.html) if you were not running Postgres.

- `post-resume.target` has been removed. See {manpage}`systemd.special(7)` about `sleep.target` for instructions on ordering a process after resume with `ExecStop=`.

- `services.kubernetes.addons.dns.coredns` has been renamed to `services.kubernetes.addons.dns.corednsImage` and now expects a
@@ -271,6 +274,8 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
- `ceph` has been upgraded to v20. See the [Ceph "tentacle" release notes](https://docs.ceph.com/en/latest/releases/tentacle/#v20-2-0-tentacle) for details and recommended upgrade procedure.
  Note that **upgrades of server-side components are one-way**, and downgrading e.g. an OSD from *Tentacle* to *Squid* is not just not supported but is known to break.

- `services.unifi`'s `jrePackage` option now defaults to `jdk25_headless` instead of `jdk17_headless`, in order to be compatible with new versions of `unifi`.

- The `networking.wireless` module has been security hardened by default: the `wpa_supplicant` daemon now runs under an unprivileged user with restricted access to the system.

  As part of these changes, `/etc/wpa_supplicant.conf` has been deprecated: the NixOS-generated configuration file is now linked to `/etc/wpa_supplicant/nixos.conf` and `/etc/wpa_supplicant/imperative.conf` has been added for imperatively configuring `wpa_supplicant` or when using [allowAuxiliaryImperativeNetworks](#opt-networking.wireless.allowAuxiliaryImperativeNetworks).
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ in
    };

    services.unifi.jrePackage = lib.mkPackageOption pkgs "jdk" {
      default = "jdk17_headless";
      default = "jdk25_headless";
      extraDescription = ''
        Check the UniFi controller release notes to ensure it is supported.
      '';
+43 −131
Original line number Diff line number Diff line
@@ -27,9 +27,9 @@ let

  inherit (lib.modules)
    mkRenamedOptionModule
    mkRemovedOptionModule
    mkMerge
    mkIf
    mkDefault
    ;

  inherit (lib.trivial) warnIf throwIf;
@@ -55,10 +55,13 @@ let
  # Ensure that it's inside mutableDataDir since it can get rather large.
  tempDir = "${mutableDataDir}/tmp";

  # Database supported by Mattermost.
  databaseDriverName = "postgres";

  # Creates a database URI.
  mkDatabaseUri =
    {
      scheme,
      scheme ? databaseDriverName,
      user ? null,
      password ? null,
      escapeUserAndPassword ? true,
@@ -105,10 +108,8 @@ let
    let
      hostIsPath = hasInfix "/" cfg.database.host;
    in
    if cfg.database.driver == "postgres" then
    if cfg.database.peerAuth then
      mkDatabaseUri {
          scheme = cfg.database.driver;
        inherit (cfg.database) user;
        path = escapeURL cfg.database.name;
        query = {
@@ -118,41 +119,13 @@ let
      }
    else
      mkDatabaseUri {
          scheme = cfg.database.driver;
        inherit (cfg.database) user password;
        host = if hostIsPath then null else cfg.database.host;
        port = if hostIsPath then null else cfg.database.port;
        path = escapeURL cfg.database.name;
        query =
          optionalAttrs hostIsPath { host = cfg.database.host; } // cfg.database.extraConnectionOptions;
        }
    else if cfg.database.driver == "mysql" then
      if cfg.database.peerAuth then
        mkDatabaseUri {
          scheme = null;
          inherit (cfg.database) user;
          escapeUserAndPassword = false;
          host = "unix(${cfg.database.socketPath})";
          escapeHost = false;
          path = escapeURL cfg.database.name;
          query = cfg.database.extraConnectionOptions;
        }
      else
        mkDatabaseUri {
          scheme = null;
          inherit (cfg.database) user password;
          escapeUserAndPassword = false;
          host =
            if hostIsPath then
              "unix(${cfg.database.host})"
            else
              "tcp(${cfg.database.host}:${toString cfg.database.port})";
          escapeHost = false;
          path = escapeURL cfg.database.name;
          query = cfg.database.extraConnectionOptions;
        }
    else
      throw "Invalid database driver: ${cfg.database.driver}";
      };

  mattermostPluginDerivations = map (
    plugin:
@@ -213,7 +186,7 @@ let
      EnableSecurityFixAlert = cfg.telemetry.enableSecurityAlerts;
    };
    TeamSettings.SiteName = cfg.siteName;
    SqlSettings.DriverName = cfg.database.driver;
    SqlSettings.DriverName = databaseDriverName;
    SqlSettings.DataSource =
      if cfg.database.fromEnvironment then
        null
@@ -358,6 +331,11 @@ in
        "dataDir"
      ]
    )
    (mkRemovedOptionModule [ "services" "mattermost" "database" "driver" ] ''
      services.mattermost.database.driver has been removed, as the only option is '${databaseDriverName}' in v11+.
      If you were using MySQL, please migrate to Postgres:
      https://docs.mattermost.com/deployment-guide/manual-postgres-migration.html
    '')
  ];

  options = {
@@ -558,22 +536,11 @@ in
      };

      database = {
        driver = mkOption {
          type = types.enum [
            "postgres"
            "mysql"
          ];
          default = "postgres";
          description = ''
            The database driver to use (Postgres or MySQL).
          '';
        };

        create = mkOption {
          type = types.bool;
          default = true;
          description = ''
            Create a local PostgreSQL or MySQL database for Mattermost automatically.
            Create a local PostgreSQL database for Mattermost automatically.
          '';
        };

@@ -591,13 +558,9 @@ in

        socketPath = mkOption {
          type = types.path;
          default =
            if cfg.database.driver == "postgres" then "/run/postgresql" else "/run/mysqld/mysqld.sock";
          defaultText = ''
            if config.services.mattermost.database.driver == "postgres" then "/run/postgresql" else "/run/mysqld/mysqld.sock";
          '';
          default = "/run/postgresql";
          description = ''
            The database (Postgres or MySQL) socket path.
            The database socket path.
          '';
        };

@@ -630,11 +593,8 @@ in

        port = mkOption {
          type = types.port;
          default = if cfg.database.driver == "postgres" then 5432 else 3306;
          defaultText = ''
            if config.services.mattermost.database.type == "postgres" then 5432 else 3306
          '';
          example = 3306;
          default = 5432;
          example = 1234;
          description = ''
            Port to use for the database.
          '';
@@ -660,34 +620,15 @@ in

        extraConnectionOptions = mkOption {
          type = with types; attrsOf (either int str);
          default =
            if cfg.database.driver == "postgres" then
              {
          default = {
            sslmode = "disable";
            connect_timeout = 60;
              }
            else if cfg.database.driver == "mysql" then
              {
                charset = "utf8mb4";
                writeTimeout = "60s";
                readTimeout = "60s";
              }
            else
              throw "Invalid database driver ${cfg.database.driver}";
          };
          defaultText = ''
            if config.mattermost.database.driver == "postgres" then
            {
              sslmode = "disable";
              connect_timeout = 60;
            }
            else if config.mattermost.database.driver == "mysql" then
              {
                charset = "utf8mb4";
                writeTimeout = "60s";
                readTimeout = "60s";
              }
            else
              throw "Invalid database driver";
          '';
          description = ''
            Extra options that are placed in the connection URI's query parameters.
@@ -756,7 +697,7 @@ in
        };
      };

      services.postgresql = mkIf (cfg.database.driver == "postgres" && cfg.database.create) {
      services.postgresql = mkIf cfg.database.create {
        enable = true;
        ensureDatabases = singleton cfg.database.name;
        ensureUsers = singleton {
@@ -772,26 +713,6 @@ in
        };
      };

      services.mysql = mkIf (cfg.database.driver == "mysql" && cfg.database.create) {
        enable = true;
        package = mkDefault pkgs.mariadb;
        ensureDatabases = singleton cfg.database.name;
        ensureUsers = singleton {
          name = cfg.database.user;
          ensurePermissions = {
            "${cfg.database.name}.*" = "ALL PRIVILEGES";
          };
        };
        settings = rec {
          mysqld = {
            collation-server = mkDefault "utf8mb4_general_ci";
            init-connect = mkDefault "SET NAMES utf8mb4";
            character-set-server = mkDefault "utf8mb4";
          };
          mysqld_safe = mysqld;
        };
      };

      environment = {
        variables = mkIf cfg.socket.export {
          MMCTL_LOCAL = "true";
@@ -840,8 +761,7 @@ in
        wantedBy = [ "multi-user.target" ];
        after = mkMerge [
          [ "network.target" ]
          (mkIf (cfg.database.driver == "postgres" && cfg.database.create) [ "postgresql.target" ])
          (mkIf (cfg.database.driver == "mysql" && cfg.database.create) [ "mysql.service" ])
          (mkIf cfg.database.create [ "postgresql.target" ])
        ];
        requires = after;

@@ -945,8 +865,7 @@ in
        ];

        unitConfig.JoinsNamespaceOf = mkMerge [
          (mkIf (cfg.database.driver == "postgres" && cfg.database.create) [ "postgresql.target" ])
          (mkIf (cfg.database.driver == "mysql" && cfg.database.create) [ "mysql.service" ])
          (mkIf cfg.database.create [ "postgresql.target" ])
        ];
      };

@@ -966,13 +885,6 @@ in
            or hostname, and services.mattermost.port to specify the port separately.
          '';
        }
        {
          # Can't use MySQL on version 11.
          assertion = versionAtLeast cfg.package.version "11" -> cfg.database.driver == "postgres";
          message = ''
            Only Postgres is supported as the database driver in Mattermost 11 and later.
          '';
        }
      ];
    })
    (mkIf cfg.matterircd.enable {
+3 −3
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@ let
      inherit tiling_wm;
    };
  stableVersion = {
    version = "2025.3.3.7"; # "Android Studio Panda 3 | 2025.3.3 Patch 1"
    sha256Hash = "sha256-FTAJ9rZPwLgIA/uPKl4d9haBxLL4O2Z+H8sY6RqaeOA=";
    url = "https://edgedl.me.gvt1.com/android/studio/ide-zips/2025.3.3.7/android-studio-panda3-patch1-linux.tar.gz";
    version = "2025.3.4.6"; # "Android Studio Panda 4 | 2025.3.4"
    sha256Hash = "sha256-Mqf/CayqOLSNYciIK+5+ITAiqLoNHxbABzOA+stQn9M=";
    url = "https://edgedl.me.gvt1.com/android/studio/ide-zips/2025.3.4.6/android-studio-panda4-linux.tar.gz";
  };
  betaVersion = {
    version = "2025.3.4.5"; # "Android Studio Panda 4 | 2025.3.4 RC 1"
Loading