NixOS-Config/modules/system/services/server/mysql/default.nix

27 lines
479 B
Nix
Raw Normal View History

2024-10-09 03:36:08 -04:00
{ pkgs, ... }:
{
2024-08-24 22:16:51 -04:00
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
];
};
}