From 2e98b1ad83450df178d55c1410acae2c7db248c2 Mon Sep 17 00:00:00 2001 From: Satria Date: Sat, 7 Mar 2026 19:15:53 +0700 Subject: [PATCH] immich migration settings --- lib/options.nix | 2 +- modules/hardware/misc/disks.nix | 13 ++++--------- modules/system/homelab/gallery.nix | 9 +++++++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index f0024ba..c8db313 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -17,7 +17,7 @@ domain = "satr14.my.id"; # root domain for dns, ssl certs, reverse proxy, etc. cf-tunnel-id = "26318288-cdd7-4e58-904b-c45f10d3e40a"; disks = { - share = "/dev/disk/by-uuid/ac61f6c8-ac20-41dd-ba93-41c4a225dc98"; # disk for nas share + gallery = "/dev/disk/by-uuid/834f51c1-90ee-4601-ba76-ef0419198d67"; # disk for photo gallery data = "/dev/disk/by-uuid/a5752dd6-092d-484c-969c-2fdc7cb4a5f0"; # disk for app data }; records = [ diff --git a/modules/hardware/misc/disks.nix b/modules/hardware/misc/disks.nix index 2081427..f2272fa 100644 --- a/modules/hardware/misc/disks.nix +++ b/modules/hardware/misc/disks.nix @@ -1,16 +1,11 @@ -{ homelab, ... }: let +{ lib, homelab, ... }: let globalOpts = { fsType = "ext4"; autoFormat = true; autoResize = true; }; in { - fileSystems = { - # "/mnt/share" = globalOpts // { - # device = homelab.disks.share; - # }; - "/mnt/data" = globalOpts // { - device = homelab.disks.data; - }; - }; + fileSystems = lib.mapAttrs' (name: device: + lib.nameValuePair "/mnt/${name}" (globalOpts // { inherit device; }) + ) homelab.disks; } \ No newline at end of file diff --git a/modules/system/homelab/gallery.nix b/modules/system/homelab/gallery.nix index b7c3a1e..c05bcc3 100644 --- a/modules/system/homelab/gallery.nix +++ b/modules/system/homelab/gallery.nix @@ -1,4 +1,4 @@ -{ ... }: { +{ homelab, ... }: { users.users.immich.extraGroups = [ "video" "render" ]; services = { @@ -6,9 +6,14 @@ enable = true; port = 2283; host = "127.0.0.1"; - mediaLocation = "/mnt/data/immich"; + mediaLocation = "/mnt/gallery/media"; accelerationDevices = null; machine-learning.enable = true; + redis.enable = true; + settings = { + newVersionCheck.enabled = true; + server.externalDomain = "https://gallery.${homelab.domain}"; + }; }; immich-public-proxy = { enable = true;