ma owncloud: re-enable secrets, add dummy secret

This commit is contained in:
makefu 2019-10-15 11:59:17 +02:00
parent 9598c99301
commit dc60431d59
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
2 changed files with 24 additions and 22 deletions

View File

@ -171,27 +171,29 @@ in {
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.redis.enable = true;
services.mysql = {
enable = false;
package = pkgs.mariadb;
rootPassword = config.krebs.secret.files.mysql_rootPassword.path;
initialDatabases = [
# Or use writeText instead of literalExample?
#{ name = "nextcloud"; schema = literalExample "./nextcloud.sql"; }
{
name = "nextcloud";
schema = pkgs.writeText "nextcloud.sql"
''
create user if not exists 'nextcloud'@'localhost' identified by 'password';
grant all privileges on nextcloud.* to 'nextcloud'@'localhost' identified by 'password';
'';
}
];
};
#services.mysql = {
# enable = false;
# package = pkgs.mariadb;
# rootPassword = config.krebs.secret.files.mysql_rootPassword.path;
# initialDatabases = [
# # Or use writeText instead of literalExample?
# #{ name = "nextcloud"; schema = literalExample "./nextcloud.sql"; }
# {
# name = "nextcloud";
# schema = pkgs.writeText "nextcloud.sql"
# ''
# create user if not exists 'nextcloud'@'localhost' identified by 'password';
# grant all privileges on nextcloud.* to 'nextcloud'@'localhost' identified by 'password';
# '';
# }
# ];
#};
# dataDir is only defined after mysql is enabled
# krebs.secret.files.mysql_rootPassword = {
# path = "${config.services.mysql.dataDir}/mysql_rootPassword";
# owner.name = "root";
# source-path = toString <secrets> + "/mysql_rootPassword";
# };
#krebs.secret.files.mysql_rootPassword = {
# path = "${config.services.mysql.dataDir}/mysql_rootPassword";
# owner.name = "root";
# source-path = toString <secrets> + "/mysql_rootPassword";
#};
}