diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2017-06-27 19:43:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 19:43:41 +0100 |
commit | 8791cad96b1bf29cb5b59c7ed52c1e52883d235b (patch) | |
tree | 8a4f6468623b276fc9506ace2a7519413260042c /nixos/modules/services | |
parent | 53de56c0cc2861ee3a0c0e8e3e9e61dab8e3ea0e (diff) | |
parent | d847b5c76323cc17f1ebcd3b4f42257930bde0c4 (diff) | |
download | nixlib-8791cad96b1bf29cb5b59c7ed52c1e52883d235b.tar nixlib-8791cad96b1bf29cb5b59c7ed52c1e52883d235b.tar.gz nixlib-8791cad96b1bf29cb5b59c7ed52c1e52883d235b.tar.bz2 nixlib-8791cad96b1bf29cb5b59c7ed52c1e52883d235b.tar.lz nixlib-8791cad96b1bf29cb5b59c7ed52c1e52883d235b.tar.xz nixlib-8791cad96b1bf29cb5b59c7ed52c1e52883d235b.tar.zst nixlib-8791cad96b1bf29cb5b59c7ed52c1e52883d235b.zip |
Merge pull request #26598 from moretea/mysql-add-bind-option
mysql module: add option to bind to an address
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/databases/mysql.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index bae6b170c472..6027f109285a 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -20,6 +20,7 @@ let '' [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) @@ -58,6 +59,13 @@ in "; }; + 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 { type = types.int; default = 3306; |