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

27 lines
502 B
Nix
Raw Permalink Normal View History

2024-10-09 03:36:08 -04:00
{ pkgs, ... }:
{
2024-08-24 22:16:51 -04:00
services.mysql = {
2024-11-13 09:43:47 -05:00
enable = config.system.server.enable;
2024-08-24 22:16:51 -04:00
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
];
};
}