From 891ff6434e7128492f44e4db03df5f82af2a8c52 Mon Sep 17 00:00:00 2001 From: Satria Date: Tue, 3 Mar 2026 14:54:58 +0700 Subject: [PATCH] use homelab data disk for apps --- modules/system/homelab/ai.nix | 3 ++- modules/system/homelab/auth.nix | 3 ++- modules/system/homelab/containers.nix | 4 ++-- modules/system/homelab/gallery.nix | 4 ++-- modules/system/homelab/git.nix | 2 ++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/system/homelab/ai.nix b/modules/system/homelab/ai.nix index dc6b291..135d86e 100644 --- a/modules/system/homelab/ai.nix +++ b/modules/system/homelab/ai.nix @@ -1,9 +1,10 @@ -{ ... }: { +{ homelab, ... }: { services = { ollama = { enable = true; host = "127.0.0.1"; port = 11434; + home = "${homelab.disks.data}/ollama"; # loadModels = [ "gemma3n:e4b" "gemma3n:e2b" ]; }; open-webui = { diff --git a/modules/system/homelab/auth.nix b/modules/system/homelab/auth.nix index dd4fad9..ca451a6 100644 --- a/modules/system/homelab/auth.nix +++ b/modules/system/homelab/auth.nix @@ -1,7 +1,8 @@ { homelab, ... }: { services.pocket-id = { enable = true; - credentials.ENCRYPTION_KEY = "/var/lib/pocket-id/encryption-key"; + credentials.ENCRYPTION_KEY = "${homelab.disks.data}/pocketid/encryption-key"; + dataDir = "${homelab.disks.data}/pocketid/data"; settings = { PORT = "1411"; HOST = "127.0.0.1"; diff --git a/modules/system/homelab/containers.nix b/modules/system/homelab/containers.nix index 0f22798..d8222d5 100644 --- a/modules/system/homelab/containers.nix +++ b/modules/system/homelab/containers.nix @@ -1,5 +1,5 @@ -{ lib, ... }: let - stacks-dir = "/opt/stacks"; +{ lib, homelab, ... }: let + stacks-dir = "${homelab.disks.data}/dockge/stacks"; in { virtualisation.oci-containers.containers."dockge" = { image = "louislam/dockge:latest"; diff --git a/modules/system/homelab/gallery.nix b/modules/system/homelab/gallery.nix index 968e397..6ae8b3e 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,7 +6,7 @@ enable = true; port = 2283; host = "127.0.0.1"; - mediaLocation = "/var/lib/immich"; + mediaLocation = "${homelab.disks.data}/immich"; accelerationDevices = null; machine-learning.enable = true; }; diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 7ae8396..460bbbe 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -1,6 +1,8 @@ { homelab, ... }: { services.forgejo = { enable = true; + lfs.enable = true; + stateDir = "${homelab.disks.data}/forgejo"; settings = { server = { DISABLE_SSH = true;