fix nextcloud shared folder access

This commit is contained in:
Ingolf Wagner 2020-06-11 16:53:39 +02:00
parent 3d0fbcf95e
commit 6cd2b63d35
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 42 additions and 10 deletions

View file

@ -1,8 +1,9 @@
{ pkgs, ... }: { pkgs, config, ... }:
let let
hostAddress = "192.168.100.10"; hostAddress = "192.168.100.10";
containerAddress = "192.168.100.11"; containerAddress = "192.168.100.11";
#syncthingGid = config.users.groups.syncthing.gid;
in { in {
@ -42,6 +43,35 @@ in {
hostPath = toString <modules>; hostPath = toString <modules>;
isReadOnly = true; 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 # container network setup

View file

@ -113,15 +113,17 @@
}; };
}; };
systemd.services."permown._media_syncthing" = { # todo now working properly
bindsTo = [ "media.mount" ]; # -------------------------
after = [ "media.mount" ]; #systemd.services."permown._media_syncthing" = {
}; # bindsTo = [ "media.mount" ];
system.permown."/media/syncthing" = { # after = [ "media.mount" ];
owner = "syncthing"; #};
group = "syncthing"; #system.permown."/media/syncthing" = {
umask = "0007"; # owner = "syncthing";
}; # group = "syncthing";
# umask = "0002";
#};
systemd.services."syncthing" = { systemd.services."syncthing" = {
bindsTo = [ "media.mount" ]; bindsTo = [ "media.mount" ];
after = [ "media.mount" ]; after = [ "media.mount" ];