Merge pull request #26598 from moretea/mysql-add-bind-option

mysql module: add option to bind to an address

Changed files
+8
nixos
modules
services
databases
+8
nixos/modules/services/databases/mysql.nix
···
''
[mysqld]
port = ${toString cfg.port}
+
${optionalString (cfg.bind != null) "bind-address = ${cfg.bind}" }
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"}
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"}
${optionalString (cfg.replication.role == "slave" && !atLeast55)
···
description = "
Which MySQL derivation to use.
";
+
};
+
+
bind = mkOption {
+
type = types.nullOr types.str;
+
default = null;
+
example = literalExample "0.0.0.0";
+
description = "Address to bind to. The default it to bind to all addresses";
};
port = mkOption {