From 955b9f4cfb2c596a0d5919fd2ccc4fd6bc3de1d0 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Sat, 26 Apr 2025 13:46:45 +0100 Subject: [PATCH] feat: immich --- hosts/architect/immich.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 hosts/architect/immich.nix diff --git a/hosts/architect/immich.nix b/hosts/architect/immich.nix new file mode 100644 index 0000000..5423588 --- /dev/null +++ b/hosts/architect/immich.nix @@ -0,0 +1,35 @@ +{ config, pkgs, lib, ... }: + +let + domain = "photos.giugl.io"; +in +{ + disabledModules = [ "services/web-apps/immich.nix" ]; + services = { + immich = { + enable = true; + package = pkgs.unstablePkgs.immich; + accelerationDevices = null; + # settings.server.externalDomain = "https://${domain}"; + }; + }; + + architect.vhost.${domain} = { + dnsInterfaces = [ "tailscale" "lan" ]; + locations."/" = { + host = "[::1]"; + port = config.services.immich.port; + allowLan = true; + allowWAN = true; + allow = [ config.architect.networks."tailscale".net ]; + proxyWebsockets = true; + extraConfig = '' + # allow large file uploads + client_max_body_size 50000M; + ''; + }; + }; + + + users.users.immich.extraGroups = [ "video" "render" "media" "nextcloud" ]; +}