ensure mediaLocation is created

This commit is contained in:
Gerg-L 2025-02-25 17:36:01 -05:00
parent c498b867f9
commit 37e81dcb42
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI

View file

@ -1,6 +1,13 @@
{ config, ... }: { config, ... }:
let
cfg = config.services.immich;
in
{ {
users.users.${config.services.immich.user}.extraGroups = [ "postgres" ]; systemd.tmpfiles.rules =
[ "d ${cfg.mediaLocation} - ${cfg.user} ${cfg.group} - -" ];
users.users.${cfg.user}.extraGroups = [ "postgres" ];
services.immich = { services.immich = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
@ -15,6 +22,5 @@
host = "0.0.0.0"; host = "0.0.0.0";
}; };
local.nginx.proxyVhosts."photos.gerg-l.com" = local.nginx.proxyVhosts."photos.gerg-l.com" = "http://localhost:${toString cfg.port}";
"http://localhost:${toString config.services.immich.port}";
} }