mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 17:03:56 -05:00
34 lines
798 B
Nix
34 lines
798 B
Nix
{ config }:
|
|
let
|
|
cfg = config.services.immich;
|
|
link = config.local.links.immich;
|
|
in
|
|
{
|
|
sops.secrets.immich.owner = cfg.user;
|
|
|
|
local.links.immich = { };
|
|
systemd.tmpfiles.rules = [ "d ${cfg.mediaLocation} - ${cfg.user} ${cfg.group} - -" ];
|
|
|
|
services.immich = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
#secretsFile = config.sops.secrets.immich.path;
|
|
database =
|
|
let
|
|
dbLink = config.local.links.postgresql;
|
|
in
|
|
{
|
|
enable = true;
|
|
createDB = true;
|
|
inherit (dbLink) port;
|
|
#host = dbLink.hostname;
|
|
};
|
|
mediaLocation = "/persist/services/immich";
|
|
machine-learning.enable = true;
|
|
settings = null;
|
|
inherit (link) port;
|
|
host = link.hostname;
|
|
};
|
|
|
|
local.nginx.proxyVhosts."photos.gerg-l.com" = link.url;
|
|
}
|