From 6cd2b63d3540a70a82411e85a3a7690c2ba20249 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 11 Jun 2020 16:53:39 +0200 Subject: [PATCH] fix nextcloud shared folder access --- configs/workhorse/nextcloud.nix | 32 +++++++++++++++++++++++++++++++- configs/workhorse/syncthing.nix | 20 +++++++++++--------- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/configs/workhorse/nextcloud.nix b/configs/workhorse/nextcloud.nix index a39a0bc..a51a163 100644 --- a/configs/workhorse/nextcloud.nix +++ b/configs/workhorse/nextcloud.nix @@ -1,8 +1,9 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: let hostAddress = "192.168.100.10"; containerAddress = "192.168.100.11"; + #syncthingGid = config.users.groups.syncthing.gid; in { @@ -42,6 +43,35 @@ in { hostPath = toString ; isReadOnly = true; }; + # shared folders + samples = { + mountPoint = toString + config.test.services.syncthing.declarative.folders.samples.path; + hostPath = toString + config.test.services.syncthing.declarative.folders.samples.path; + isReadOnly = true; + }; + movies = { + mountPoint = toString + config.test.services.syncthing.declarative.folders.movies.path; + hostPath = toString + config.test.services.syncthing.declarative.folders.movies.path; + isReadOnly = true; + }; + music = { + mountPoint = toString + config.test.services.syncthing.declarative.folders.music-library.path; + hostPath = toString + config.test.services.syncthing.declarative.folders.music-library.path; + isReadOnly = true; + }; + series = { + mountPoint = toString + config.test.services.syncthing.declarative.folders.series.path; + hostPath = toString + config.test.services.syncthing.declarative.folders.series.path; + isReadOnly = true; + }; }; # container network setup diff --git a/configs/workhorse/syncthing.nix b/configs/workhorse/syncthing.nix index e62836b..cd56a5c 100644 --- a/configs/workhorse/syncthing.nix +++ b/configs/workhorse/syncthing.nix @@ -113,15 +113,17 @@ }; }; - systemd.services."permown._media_syncthing" = { - bindsTo = [ "media.mount" ]; - after = [ "media.mount" ]; - }; - system.permown."/media/syncthing" = { - owner = "syncthing"; - group = "syncthing"; - umask = "0007"; - }; + # todo now working properly + # ------------------------- + #systemd.services."permown._media_syncthing" = { + # bindsTo = [ "media.mount" ]; + # after = [ "media.mount" ]; + #}; + #system.permown."/media/syncthing" = { + # owner = "syncthing"; + # group = "syncthing"; + # umask = "0002"; + #}; systemd.services."syncthing" = { bindsTo = [ "media.mount" ]; after = [ "media.mount" ];