summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2021-12-18 21:26:47 -0500
committerAaron Andersen <aaron@fosslib.net>2021-12-22 08:57:14 -0500
commita96f6ef187a8c541c65972a56fa03dbc1daba438 (patch)
treead5a9beda5ce1e7e85cfb4c4c3cd336ce0b69ebe /nixos
parent76457da532300330b5b9c74d5d312e72ce2c90b3 (diff)
nixos/mysql: remove services.mysql.bind and services.mysql.port in favor of services.mysql.settings
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/databases/mysql.nix18
1 files changed, 3 insertions, 15 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index 1f32f1d0f5dc..75740830e6ef 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -21,6 +21,8 @@ in
(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" "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
@@ -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 {
type = types.str;
default = "mysql";
@@ -315,8 +304,7 @@ in
services.mysql.settings.mysqld = mkMerge [
{
datadir = cfg.dataDir;
- bind-address = mkIf (cfg.bind != null) cfg.bind;
- port = cfg.port;
+ port = mkDefault 3306;
}
(mkIf (cfg.replication.role == "master" || cfg.replication.role == "slave") {
log-bin = "mysql-bin-${toString cfg.replication.serverId}";