NixOS-Config/system/server/mariadb.nix

26 lines
477 B
Nix
Raw Normal View History

2024-08-24 22:16:51 -04:00
{pkgs, ...}: {
services.mysql = {
enable = true;
package = pkgs.mariadb;
dataDir = "/var/lib/mysql";
2024-09-10 14:45:28 -04:00
ensureDatabases = [
"minecraft"
"photoprism"
2024-08-24 22:16:51 -04:00
];
ensureUsers = [
{
name = "minecraft";
ensurePermissions = {
"minecraft.*" = "ALL PRIVILEGES";
};
}
2024-09-10 14:45:28 -04:00
{
name = "photoprism";
ensurePermissions = {
"photoprism.*" = "ALL PRIVILEGES";
};
}
2024-08-24 22:16:51 -04:00
];
};
}