nixos/mysql: drop rootPassword option
This commit is contained in:
parent
7d44ceeb2c
commit
fb918a9254
@ -213,6 +213,7 @@ with lib;
|
|||||||
(mkRemovedOptionModule [ "boot" "zfs" "enableLegacyCrypto" ] "The corresponding package was removed from nixpkgs.")
|
(mkRemovedOptionModule [ "boot" "zfs" "enableLegacyCrypto" ] "The corresponding package was removed from nixpkgs.")
|
||||||
(mkRemovedOptionModule [ "services" "winstone" ] "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" "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
|
# ZSH
|
||||||
(mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
|
(mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
|
||||||
|
@ -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 = {
|
replication = {
|
||||||
role = mkOption {
|
role = mkOption {
|
||||||
type = types.enum [ "master" "slave" "none" ];
|
type = types.enum [ "master" "slave" "none" ];
|
||||||
@ -400,16 +394,6 @@ in
|
|||||||
cat ${toString cfg.initialScript} | ${mysql}/bin/mysql -u root -N
|
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
|
rm /tmp/mysql_init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user