feat: run immich

Changed files
+28 -18
dns
hosts
box
helix
profiles
immich
+2 -1
dns/dnsconfig.js
··· 40 40 A('bin', '69.61.2.203', TTL(300)), 41 41 A('ci', '69.61.2.203', TTL(300)), 42 42 A('write', '69.61.2.203', TTL(300)), 43 - // vultr -> nulled: lituus 43 + A('photos', '69.61.2.203', TTL(300)), 44 + // vultr: lituus 44 45 A('@', '45.77.48.108', TTL(300)), 45 46 A('jitsi', '45.77.48.108', TTL(300)), 46 47 A('chat', '45.77.48.108', TTL(300)),
+2
hosts/box/default.nix
··· 50 50 # "/home/anish/usr/nonfiction" # syncthing 51 51 "/home/anish/usr/finance" # beancount 52 52 "/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul 53 + "/mnt/two/photos" 54 + "/mnt/two/music" 53 55 ]; 54 56 # seafile 55 57 };
+13 -13
hosts/helix/default.nix
··· 31 31 }; 32 32 33 33 # Reverse proxy for immich 34 - services.nginx.virtualHosts."photos.sealight.xyz" = { 35 - enableACME = true; 36 - forceSSL = true; 34 + # services.nginx.virtualHosts."photos.sealight.xyz" = { 35 + # enableACME = true; 36 + # forceSSL = true; 37 37 38 - locations."/" = { 39 - extraConfig = '' 40 - proxy_pass http://10.0.69.4:8567; 41 - proxy_set_header Host $host; 42 - proxy_set_header X-Real-IP $remote_addr; 43 - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 44 - proxy_set_header X-Forwarded-Proto $scheme; 45 - ''; 46 - }; 47 - }; 38 + # locations."/" = { 39 + # extraConfig = '' 40 + # proxy_pass http://10.0.69.4:8567; 41 + # proxy_set_header Host $host; 42 + # proxy_set_header X-Real-IP $remote_addr; 43 + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 44 + # proxy_set_header X-Forwarded-Proto $scheme; 45 + # ''; 46 + # }; 47 + # }; 48 48 49 49 services.postgresql.package = pkgs.postgresql_15; 50 50 services.postgresqlBackup = {
+11 -4
hosts/profiles/immich/default.nix
··· 1 - { ... }: 1 + { pkgs, config, ... }: 2 2 { 3 3 services.immich = { 4 4 enable = true; ··· 7 7 }; 8 8 host = "0.0.0.0"; 9 9 port = 8567; 10 - mediaLocation = "/data/photos"; 11 - externalDomain = "https://photos.sealight.xyz"; 10 + mediaLocation = "/mnt/two/photos"; 11 + openFirewall = true; 12 + settings.server.externalDomain = "https://photos.sealight.xyz"; 12 13 }; 13 14 services.nginx.virtualHosts."photos.mossnet.lan" = { 14 15 enableACME = false; 15 16 forceSSL = false; 16 17 17 18 locations."/" = { 19 + proxyPass = "http://127.0.0.1:${toString config.services.immich.port}"; 20 + proxyWebsockets = true; 21 + recommendedProxySettings = true; 18 22 extraConfig = '' 19 - proxy_pass http://127.0.0.1:8567/; 23 + client_max_body_size 50000M; 24 + proxy_read_timeout 600s; 25 + proxy_send_timeout 600s; 26 + send_timeout 600s; 20 27 ''; 21 28 }; 22 29 };