mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-09 15:10:19 +02:00
even more config
This commit is contained in:
parent
2a5999ef1b
commit
ab464b0200
1 changed files with 37 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue