Merge branch 'staging-next-21.05' into staging-21.05
This commit is contained in:
@@ -4,7 +4,7 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) mysql gzip;
|
||||
inherit (pkgs) mariadb gzip;
|
||||
|
||||
cfg = config.services.mysqlBackup;
|
||||
defaultUser = "mysqlbackup";
|
||||
@@ -20,7 +20,7 @@ let
|
||||
'';
|
||||
backupDatabaseScript = db: ''
|
||||
dest="${cfg.location}/${db}.gz"
|
||||
if ${mysql}/bin/mysqldump ${if cfg.singleTransaction then "--single-transaction" else ""} ${db} | ${gzip}/bin/gzip -c > $dest.tmp; then
|
||||
if ${mariadb}/bin/mysqldump ${if cfg.singleTransaction then "--single-transaction" else ""} ${db} | ${gzip}/bin/gzip -c > $dest.tmp; then
|
||||
mv $dest.tmp $dest
|
||||
echo "Backed up to $dest"
|
||||
else
|
||||
|
||||
@@ -34,7 +34,7 @@ in
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
example = literalExample "pkgs.mysql";
|
||||
example = literalExample "pkgs.mariadb";
|
||||
description = "
|
||||
Which MySQL derivation to use. MariaDB packages are supported too.
|
||||
";
|
||||
|
||||
@@ -42,6 +42,11 @@ in {
|
||||
description = ''
|
||||
The interfaces <command>wpa_supplicant</command> will use. If empty, it will
|
||||
automatically use all wireless interfaces.
|
||||
<warning><para>
|
||||
The automatic discovery of interfaces does not work reliably on boot:
|
||||
it may fail and leave the system without network. When possible, specify
|
||||
a known interface name.
|
||||
</para></warning>
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -225,6 +230,14 @@ in {
|
||||
message = ''options networking.wireless."${name}".{psk,pskRaw,auth} are mutually exclusive'';
|
||||
});
|
||||
|
||||
warnings =
|
||||
optional (cfg.interfaces == [] && config.systemd.services.wpa_supplicant.wantedBy != [])
|
||||
''
|
||||
No network interfaces for wpa_supplicant have been configured: the service
|
||||
may randomly fail to start at boot. You should specify at least one using the option
|
||||
networking.wireless.interfaces.
|
||||
'';
|
||||
|
||||
environment.systemPackages = [ package ];
|
||||
|
||||
services.dbus.packages = [ package ];
|
||||
|
||||
@@ -27,7 +27,7 @@ let
|
||||
|
||||
# NOTE: Use password authentication, since mysqljs does not yet support auth_socket
|
||||
if [ ! -e /var/lib/epgstation/db-created ]; then
|
||||
${pkgs.mysql}/bin/mysql -e \
|
||||
${pkgs.mariadb}/bin/mysql -e \
|
||||
"GRANT ALL ON \`${cfg.database.name}\`.* TO '${username}'@'localhost' IDENTIFIED by '$DB_PASSWORD';"
|
||||
touch /var/lib/epgstation/db-created
|
||||
fi
|
||||
@@ -224,7 +224,7 @@ in
|
||||
|
||||
services.mysql = {
|
||||
enable = mkDefault true;
|
||||
package = mkDefault pkgs.mysql;
|
||||
package = mkDefault pkgs.mariadb;
|
||||
ensureDatabases = [ cfg.database.name ];
|
||||
# FIXME: enable once mysqljs supports auth_socket
|
||||
# ensureUsers = [ {
|
||||
|
||||
@@ -728,7 +728,7 @@ in
|
||||
|
||||
services.postgresql.enable = lib.mkDefault createLocalPostgreSQL;
|
||||
services.mysql.enable = lib.mkDefault createLocalMySQL;
|
||||
services.mysql.package = lib.mkIf createLocalMySQL pkgs.mysql;
|
||||
services.mysql.package = lib.mkIf createLocalMySQL pkgs.mariadb;
|
||||
};
|
||||
|
||||
meta.doc = ./keycloak.xml;
|
||||
|
||||
@@ -644,7 +644,7 @@ let
|
||||
|
||||
services.mysql = mkIf mysqlLocal {
|
||||
enable = true;
|
||||
package = mkDefault pkgs.mysql;
|
||||
package = mkDefault pkgs.mariadb;
|
||||
ensureDatabases = [ cfg.database.name ];
|
||||
ensureUsers = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user