From c8fe2202a8ca76b7950d53d346b883ccfc598c87 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 26 May 2025 21:28:08 +0200 Subject: [PATCH] Move nextcloud off longhorn --- modules/bootstrap-default.nix | 2 -- modules/nextcloud.nix | 26 ++++++++++++-------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/modules/bootstrap-default.nix b/modules/bootstrap-default.nix index 38149c9..e8d3101 100644 --- a/modules/bootstrap-default.nix +++ b/modules/bootstrap-default.nix @@ -88,8 +88,6 @@ lab = { longhorn.persistentVolume = { atuin-db.storage = "300Mi"; - nextcloud.storage = "50Gi"; - nextcloud-db.storage = "400Mi"; kitchenowl.storage = "100Mi"; paperless-data.storage = "10Gi"; paperless-redisdata.storage = "20Mi"; diff --git a/modules/nextcloud.nix b/modules/nextcloud.nix index 11df1fd..fa73438 100644 --- a/modules/nextcloud.nix +++ b/modules/nextcloud.nix @@ -33,7 +33,12 @@ }; spec = { - volumes.data.persistentVolumeClaim.claimName = "data"; + nodeName = "atlas"; + + volumes.data.hostPath = { + path = "/mnt/longhorn/persistent/volumes/nextcloud"; + type = "Directory"; + }; containers.nextcloud = { image = globals.images.nextcloud; @@ -101,6 +106,8 @@ }; spec = { + nodeName = "atlas"; + containers.postgres = { image = globals.images.postgres15; imagePullPolicy = "IfNotPresent"; @@ -125,7 +132,10 @@ ]; }; - volumes.database.persistentVolumeClaim.claimName = "database"; + volumes.database.hostPath = { + path = "/mnt/longhorn/persistent/volumes/nextcloud-db"; + type = "Directory"; + }; }; }; }; @@ -166,18 +176,6 @@ host = "nextcloud"; service.name = "server"; }; - - longhorn.persistentVolumeClaim = { - data = { - volumeName = "nextcloud"; - storage = "50Gi"; - }; - - database = { - volumeName = "nextcloud-db"; - storage = "400Mi"; - }; - }; }; }; }