mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-01-18 13:29:32 +01:00
even more config
This commit is contained in:
parent
2a5999ef1b
commit
ab464b0200
37
features/photoprism.nix
Normal file
37
features/photoprism.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
sops.secrets.photoprism = {
|
||||
sopsFile
|
||||
};
|
||||
|
||||
services.photoprism = {
|
||||
enable = true;
|
||||
port = 2342;
|
||||
originalsPath = "/var/lib/private/photoprism/originals";
|
||||
settings = {
|
||||
PHOTOPRISM_ADMIN_USER = "admin";
|
||||
PHOTOPRISM_ADMIN_PASSWORD = "...";
|
||||
PHOTOPRISM_DEFAULT_LOCALE = "fr";
|
||||
PHOTOPRISM_DATABASE_DRIVER = "mysql";
|
||||
PHOTOPRISM_DATABASE_NAME = "photoprism";
|
||||
PHOTOPRISM_DATABASE_SERVER = "/run/mysqld/mysqld.sock";
|
||||
PHOTOPRISM_DATABASE_USER = "photoprism";
|
||||
PHOTOPRISM_SITE_URL = "http://192.168.1.177:2342";
|
||||
PHOTOPRISM_SITE_TITLE = "hyperreal photoprism???";
|
||||
};
|
||||
};
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
ensureDatabases = [ "photoprism" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "photoprism";
|
||||
ensurePermissions = {
|
||||
"photoprism.*" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue