feat(eientei): enable photoprism
This commit is contained in:
parent
597c18766d
commit
48fe60c90b
2 changed files with 24 additions and 20 deletions
24
spec/eientei/photoprism.nix
Normal file
24
spec/eientei/photoprism.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
services.photoprism = {
|
||||||
|
enable = true;
|
||||||
|
originalsPath = "/run/storage/aerial";
|
||||||
|
settings.PHOTOPRISM_ADMIN_USER = "koishi";
|
||||||
|
passwordFile = "/var/lib/photoprism/password";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."raw.514fpv.io" = {
|
||||||
|
useACMEHost = ".514fpv.io";
|
||||||
|
addSSL = true;
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_buffering off;
|
||||||
|
'';
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:2342";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persistence."/nix/persist/fhs".directories = [
|
||||||
|
"/var/lib/photoprism"
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
services.photoview = {
|
|
||||||
enable = false;
|
|
||||||
database.driver = "postgres";
|
|
||||||
database.string = "postgresql:///photoview?host=/var/run/postgresql";
|
|
||||||
stateDir = "/nix/persist/service/photoview";
|
|
||||||
secrets = "/nix/persist/service/photoview/secrets.env" ;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."raw.514fpv.io" = {
|
|
||||||
useACMEHost = ".514fpv.io";
|
|
||||||
addSSL = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:8000";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
global.fs.zfs.mountpoints."/nix/persist/service/photoview" = "service/photoview";
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue