mirror of
https://github.com/ordinary-dev/nixos-config.git
synced 2024-09-20 03:40:29 +05:00
Add mariadb
This commit is contained in:
parent
7c8d0488c8
commit
03c3057687
|
@ -14,6 +14,7 @@
|
||||||
./programs/redis.nix
|
./programs/redis.nix
|
||||||
./programs/nextcloud.nix
|
./programs/nextcloud.nix
|
||||||
./programs/jellyfin.nix
|
./programs/jellyfin.nix
|
||||||
|
./programs/mysql.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
|
|
16
nixos/programs/mysql.nix
Normal file
16
nixos/programs/mysql.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.mysql = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mariadb;
|
||||||
|
ensureDatabases = [ "photoprism" ];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "photoprism";
|
||||||
|
ensurePermissions = {
|
||||||
|
"photoprism.*" = "ALL PRIVILEGES";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue