Wtf why did it remove everything.
This commit is contained in:
parent
d58b606d90
commit
2144d9ef61
73 changed files with 1077 additions and 0 deletions
23
modules/system/services/server/mysql/default.nix
Normal file
23
modules/system/services/server/mysql/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config = lib.mkIf config.system.server.enable {
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
ensureDatabases = [
|
||||
"minecraft"
|
||||
];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "minecraft";
|
||||
ensurePermissions = {
|
||||
"minecraft.*" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
environment.persistence."/persist".directories = [
|
||||
"/var/lib/mysql"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue