27 lines
502 B
Nix
27 lines
502 B
Nix
{ pkgs, ... }:
|
|
{
|
|
services.mysql = {
|
|
enable = config.system.server.enable;
|
|
package = pkgs.mariadb;
|
|
dataDir = "/var/lib/mysql";
|
|
ensureDatabases = [
|
|
"minecraft"
|
|
"photoprism"
|
|
];
|
|
ensureUsers = [
|
|
{
|
|
name = "minecraft";
|
|
ensurePermissions = {
|
|
"minecraft.*" = "ALL PRIVILEGES";
|
|
};
|
|
}
|
|
{
|
|
name = "photoprism";
|
|
ensurePermissions = {
|
|
"photoprism.*" = "ALL PRIVILEGES";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|