diff --git a/system/options.nix b/system/options.nix index d3679bc0bf7d..7fad6af33c6c 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1519,6 +1519,40 @@ }; + mysql = { + enable = mkOption { + default = false; + description = " + Whether to enable the MySQL server. + "; + }; + + port = mkOption { + default = "3306"; + description = "Port of MySQL"; + }; + + user = mkOption { + default = "nobody"; + description = "User account under which MySQL runs"; + }; + + datadir = mkOption { + default = "/var/mysql"; + description = "Location where MySQL stores its table files"; + }; + + log_error = mkOption { + default = "/var/log/mysql_err.log"; + description = "Location of the MySQL error logfile"; + }; + + pid_file = mkOption { + default = "/var/mysql/mysql.pid"; + description = "Location of the file which stores the PID of the MySQL server"; + }; + }; + installer = { diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix index 7fe6d45dfe69..dc049f36812e 100644 --- a/upstart-jobs/default.nix +++ b/upstart-jobs/default.nix @@ -168,6 +168,12 @@ let }) */ + # MySQL server + ++ optional config.services.mysql.enable + (import ../upstart-jobs/mysql.nix { + inherit config pkgs; + }) + # Postgres SQL server ++ optional config.services.postgresql.enable (import ../upstart-jobs/postgresql.nix {