nixos/mysql: remove services.mysql.bind and services.mysql.port in favor of services.mysql.settings
This commit is contained in:
@@ -21,6 +21,8 @@ in
|
|||||||
(mkRemovedOptionModule [ "services" "mysql" "pidDir" ] "Don't wait for pidfiles, describe dependencies through systemd.")
|
(mkRemovedOptionModule [ "services" "mysql" "pidDir" ] "Don't wait for pidfiles, describe dependencies through systemd.")
|
||||||
(mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
|
(mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
|
||||||
(mkRemovedOptionModule [ "services" "mysql" "extraOptions" ] "Use services.mysql.settings.mysqld instead.")
|
(mkRemovedOptionModule [ "services" "mysql" "extraOptions" ] "Use services.mysql.settings.mysqld instead.")
|
||||||
|
(mkRemovedOptionModule [ "services" "mysql" "bind" ] "Use services.mysql.settings.mysqld.bind-address instead.")
|
||||||
|
(mkRemovedOptionModule [ "services" "mysql" "port" ] "Use services.mysql.settings.mysqld.port instead.")
|
||||||
];
|
];
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
@@ -39,19 +41,6 @@ in
|
|||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
bind = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = null;
|
|
||||||
example = "0.0.0.0";
|
|
||||||
description = "Address to bind to. The default is to bind to all addresses.";
|
|
||||||
};
|
|
||||||
|
|
||||||
port = mkOption {
|
|
||||||
type = types.port;
|
|
||||||
default = 3306;
|
|
||||||
description = "Port of MySQL.";
|
|
||||||
};
|
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "mysql";
|
default = "mysql";
|
||||||
@@ -315,8 +304,7 @@ in
|
|||||||
services.mysql.settings.mysqld = mkMerge [
|
services.mysql.settings.mysqld = mkMerge [
|
||||||
{
|
{
|
||||||
datadir = cfg.dataDir;
|
datadir = cfg.dataDir;
|
||||||
bind-address = mkIf (cfg.bind != null) cfg.bind;
|
port = mkDefault 3306;
|
||||||
port = cfg.port;
|
|
||||||
}
|
}
|
||||||
(mkIf (cfg.replication.role == "master" || cfg.replication.role == "slave") {
|
(mkIf (cfg.replication.role == "master" || cfg.replication.role == "slave") {
|
||||||
log-bin = "mysql-bin-${toString cfg.replication.serverId}";
|
log-bin = "mysql-bin-${toString cfg.replication.serverId}";
|
||||||
|
|||||||
Reference in New Issue
Block a user