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 = [
|
||||
{
|
||||
|
||||
@@ -348,5 +348,24 @@ let self = {
|
||||
"20.09".ap-east-1.hvm-ebs = "ami-0c42f97e5b1fda92f";
|
||||
"20.09".sa-east-1.hvm-ebs = "ami-021637976b094959d";
|
||||
|
||||
latest = self."20.09";
|
||||
# 21.05.740.aa576357673
|
||||
"21.05".eu-west-1.hvm-ebs = "ami-048dbc738074a3083";
|
||||
"21.05".eu-west-2.hvm-ebs = "ami-0234cf81fec68315d";
|
||||
"21.05".eu-west-3.hvm-ebs = "ami-020e459baf709107d";
|
||||
"21.05".eu-central-1.hvm-ebs = "ami-0857d5d1309ab8b77";
|
||||
"21.05".eu-north-1.hvm-ebs = "ami-05403e3ae53d3716f";
|
||||
"21.05".us-east-1.hvm-ebs = "ami-0d3002ba40b5b9897";
|
||||
"21.05".us-east-2.hvm-ebs = "ami-069a0ca1bde6dea52";
|
||||
"21.05".us-west-1.hvm-ebs = "ami-0b415460a84bcf9bc";
|
||||
"21.05".us-west-2.hvm-ebs = "ami-093cba49754abd7f8";
|
||||
"21.05".ca-central-1.hvm-ebs = "ami-065c13e1d52d60b33";
|
||||
"21.05".ap-southeast-1.hvm-ebs = "ami-04f570c70ff9b665e";
|
||||
"21.05".ap-southeast-2.hvm-ebs = "ami-02a3d1df595df5ef6";
|
||||
"21.05".ap-northeast-1.hvm-ebs = "ami-027836fddb5c56012";
|
||||
"21.05".ap-northeast-2.hvm-ebs = "ami-0edacd41dc7700c39";
|
||||
"21.05".ap-south-1.hvm-ebs = "ami-0b279b5bb55288059";
|
||||
"21.05".ap-east-1.hvm-ebs = "ami-06dc98082bc55c1fc";
|
||||
"21.05".sa-east-1.hvm-ebs = "ami-04737dd49b98936c6";
|
||||
|
||||
latest = self."21.05";
|
||||
}; in self
|
||||
|
||||
Reference in New Issue
Block a user