From f97f7d4666c6b02947e1d685fa6f4d232f447c33 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sat, 8 Feb 2025 14:49:38 +0100 Subject: [PATCH] Share keepassxc using syncthing Remove unused syncthing shares --- modules/bootstrap-default.nix | 27 ++++++++------------------- modules/syncthing.nix | 26 +++++++++++++------------- 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/modules/bootstrap-default.nix b/modules/bootstrap-default.nix index bc2676c..59e51a1 100644 --- a/modules/bootstrap-default.nix +++ b/modules/bootstrap-default.nix @@ -67,7 +67,7 @@ nodes = builtins.mapAttrs - (name: labels: { + (_name: labels: { metadata.labels = labels; }) globals.nodeLabels; @@ -82,25 +82,13 @@ ipAddressPools.main.spec.addresses = ["192.168.30.128-192.168.30.200" "2a0d:6e00:1a77:30::2-2a0d:6e00:1a77:30:ffff:ffff:ffff:fffe"]; l2Advertisements.main.metadata = {}; - persistentVolumes = { - music-syncthing.spec = { - capacity.storage = "1Gi"; - accessModes = ["ReadWriteMany"]; + persistentVolumes.media-media.spec = { + capacity.storage = "1Gi"; + accessModes = ["ReadWriteMany"]; - nfs = { - server = "lewis.dmz"; - path = "/mnt/longhorn/persistent/media/music"; - }; - }; - - media-media.spec = { - capacity.storage = "1Gi"; - accessModes = ["ReadWriteMany"]; - - nfs = { - server = "lewis.dmz"; - path = "/mnt/longhorn/persistent/media"; - }; + nfs = { + server = "lewis.dmz"; + path = "/mnt/longhorn/persistent/media"; }; }; }; @@ -139,6 +127,7 @@ ntfy.storage = "300Mi"; deluge.storage = "500Mi"; authelia.storage = "100Mi"; + keepassxc.storage = "100Mi"; }; tailscaleIngresses.tailscale-longhorn = { diff --git a/modules/syncthing.nix b/modules/syncthing.nix index c06b81a..31bde21 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -45,15 +45,15 @@ mountPath = "/config"; } { - name = "music"; - mountPath = "/music"; + name = "keepassxc"; + mountPath = "/keepassxc"; } ]; }; volumes = { config.persistentVolumeClaim.claimName = "config"; - music.persistentVolumeClaim.claimName = "music"; + keepassxc.persistentVolumeClaim.claimName = "keepassxc"; }; securityContext = { @@ -74,19 +74,19 @@ targetPort = "web"; }; }; - - persistentVolumeClaims.music.spec = { - accessModes = ["ReadWriteMany"]; - storageClassName = ""; - resources.requests.storage = "1Mi"; - volumeName = "music-syncthing"; - }; }; lab = { - longhorn.persistentVolumeClaim.config = { - volumeName = "syncthing"; - storage = "400Mi"; + longhorn.persistentVolumeClaim = { + config = { + volumeName = "syncthing"; + storage = "400Mi"; + }; + + keepassxc = { + volumeName = "keepassxc"; + storage = "100Mi"; + }; }; tailscaleIngresses.tailscale = {