initial server config

This commit is contained in:
Daniel Kauss Serna 2026-02-03 13:22:21 +01:00
commit 8f6d63909a
10 changed files with 313 additions and 0 deletions

28
services/immich.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
services.immich = {
enable = true;
mediaLocation = "/var/lib/data/immich";
host = "127.0.0.1";
port = 2283;
machine-learning.environment.MACHINE_LEARNING_REQUEST_THREADS = "2";
};
services.caddy.virtualHosts."photos.danielk.me" = {
extraConfig = ''
reverse_proxy 127.0.0.1:2283
'';
};
# Thumbnails on ssd for faster loading
fileSystems."/var/lib/data/immich/thumbs" = {
device = "/var/lib/immich-thumbnails";
options = [ "bind" ];
};
systemd.tmpfiles.rules = [
"d /var/lib/data/immich 0750 immich immich -"
"d /var/lib/immich-thumbnails 0750 immich immich -"
];
}