+15
nixos/doc/manual/release-notes/rl-2505.section.md
+15
nixos/doc/manual/release-notes/rl-2505.section.md
···- [`system.stateVersion`](#opt-system.stateVersion) is now validated and must be in the `"YY.MM"` format, ideally corresponding to a prior NixOS release.- [`services.geoclue2`](#opt-services.geoclue2.enable) now has an `enableStatic` option, which allows the NixOS configuration to specify a fixed location for GeoClue to use.
···- [`system.stateVersion`](#opt-system.stateVersion) is now validated and must be in the `"YY.MM"` format, ideally corresponding to a prior NixOS release.+- `services.mysql` now supports easy cluster setup via [`services.mysql.galeraCluster`](#opt-services.mysql.galeraCluster.enable) option.- [`services.geoclue2`](#opt-services.geoclue2.enable) now has an `enableStatic` option, which allows the NixOS configuration to specify a fixed location for GeoClue to use.
+169
-5
nixos/modules/services/databases/mysql.nix
+169
-5
nixos/modules/services/databases/mysql.nix
······if lib.versionAtLeast config.system.stateVersion "17.09" then "/var/lib/mysql" else "/var/mysql"·········
···+description = "The MariaDB Galera package that provides the shared library 'libgalera_smm.so' required for cluster functionality.";+description = "The logical name of the Galera cluster. All nodes in the same cluster must use the same name.";+description = "Method for the initial state transfer (wsrep_sst_method) when a node joins the cluster. Be aware that rsync needs SSH keys to be generated and authorized on all nodes!";+description = "The unique name that identifies this particular node within the cluster. Each node must have a different name.";+description = "IP address or hostname of this node that will be used for cluster communication. Must be reachable by all other nodes.";+description = "IP addresses or hostnames of all nodes in the cluster, including this node. This is used to construct the default clusterAddress connection string.";+description = "Optional password for securing cluster communications. If provided, it will be used in the clusterAddress for authentication between nodes.";+description = "Full Galera cluster connection string. If nodeAddresses is set, this will be auto-generated, but you can override it with a custom value. Format is typically 'gcomm://node1,node2,node3' with optional parameters.";+"gcomm://''${builtins.concatStringsSep \",\" config.services.mysql.galeraCluster.nodeAddresses}"···+message = "'services.mysql.galeraCluster.enable' expect services.mysql.package to be an mariadb variant";+message = "mariadb galera cluster is enabled but the localAddress and (nodeAddresses or clusterAddress) are not set";+assertion = !(cfg.galeraCluster.clusterAddress != "" && cfg.galeraCluster.clusterPassword != "");+message = "When services.mysql.galeraCluster.clusterAddress is set, setting services.mysql.galeraCluster.nodeAddresses is redundant and will be overwritten by clusterAddress. Choose one approach.";if lib.versionAtLeast config.system.stateVersion "17.09" then "/var/lib/mysql" else "/var/mysql"·········
+15
-42
nixos/tests/mysql/mariadb-galera.nix
+15
-42
nixos/tests/mysql/mariadb-galera.nix
······
······