about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2019-06-25 17:05:55 -0400
committerAaron Andersen <aaron@fosslib.net>2019-06-25 17:26:53 -0400
commitfb918a9254b5085d9bdb7eec36907da52a6cef70 (patch)
treed9dbcecf7ee305a3ff67a44a9f7b5fc3580ce3ab
parent7d44ceeb2c3a00ac020d76e54d0ff9f9800048d1 (diff)
downloadnixlib-fb918a9254b5085d9bdb7eec36907da52a6cef70.tar
nixlib-fb918a9254b5085d9bdb7eec36907da52a6cef70.tar.gz
nixlib-fb918a9254b5085d9bdb7eec36907da52a6cef70.tar.bz2
nixlib-fb918a9254b5085d9bdb7eec36907da52a6cef70.tar.lz
nixlib-fb918a9254b5085d9bdb7eec36907da52a6cef70.tar.xz
nixlib-fb918a9254b5085d9bdb7eec36907da52a6cef70.tar.zst
nixlib-fb918a9254b5085d9bdb7eec36907da52a6cef70.zip
nixos/mysql: drop rootPassword option
-rw-r--r--nixos/modules/rename.nix1
-rw-r--r--nixos/modules/services/databases/mysql.nix16
2 files changed, 1 insertions, 16 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index a424e86038e7..7fa76dc0c688 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -213,6 +213,7 @@ with lib;
     (mkRemovedOptionModule [ "boot" "zfs" "enableLegacyCrypto" ] "The corresponding package was removed from nixpkgs.")
     (mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.")
     (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.")
 
     # ZSH
     (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index 66d55b650a45..02f406833131 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -204,12 +204,6 @@ in
         '';
       };
 
-      # FIXME: remove this option; it's a really bad idea.
-      rootPassword = mkOption {
-        default = null;
-        description = "Path to a file containing the root password, modified on the first startup. Not specifying a root password will leave the root password empty.";
-      };
-
       replication = {
         role = mkOption {
           type = types.enum [ "master" "slave" "none" ];
@@ -400,16 +394,6 @@ in
                     cat ${toString cfg.initialScript} | ${mysql}/bin/mysql -u root -N
                   ''}
 
-                ${optionalString (cfg.rootPassword != null)
-                  ''
-                    # Change root password
-
-                    ( echo "use mysql;"
-                      echo "update user set Password=password('$(cat ${cfg.rootPassword})') where User='root';"
-                      echo "flush privileges;"
-                    ) | ${mysql}/bin/mysql -u root -N
-                  ''}
-
               rm /tmp/mysql_init
             fi