Add mariadb

This commit is contained in:
Ivan R. 2023-08-19 08:53:07 +05:00
parent 7c8d0488c8
commit 03c3057687
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C
2 changed files with 17 additions and 0 deletions

View file

@ -14,6 +14,7 @@
./programs/redis.nix
./programs/nextcloud.nix
./programs/jellyfin.nix
./programs/mysql.nix
];
# Enable flakes

16
nixos/programs/mysql.nix Normal file
View file

@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
services.mysql = {
enable = true;
package = pkgs.mariadb;
ensureDatabases = [ "photoprism" ];
ensureUsers = [
{
name = "photoprism";
ensurePermissions = {
"photoprism.*" = "ALL PRIVILEGES";
};
}
];
};
}