fix(copyparty): apply volume permissions
This commit is contained in:
@@ -133,6 +133,7 @@ in
|
|||||||
// lib.mapAttrs' (
|
// lib.mapAttrs' (
|
||||||
_urlPath: volume:
|
_urlPath: volume:
|
||||||
lib.nameValuePair volume.path {
|
lib.nameValuePair volume.path {
|
||||||
|
inherit (volume) readOnly;
|
||||||
directory = volume.hostPath;
|
directory = volume.hostPath;
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "storage";
|
group = "storage";
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ let
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
umask 077
|
umask 077
|
||||||
password="$(${pkgs.coreutils}/bin/tr -d '\n' < "$CREDENTIALS_DIRECTORY/password")"
|
password="$(${lib.getExe' pkgs.coreutils "tr"} -d '\n' < "$CREDENTIALS_DIRECTORY/password")"
|
||||||
|
|
||||||
cat > /run/copyparty/copyparty.conf <<EOF
|
cat > /run/copyparty/copyparty.conf <<EOF
|
||||||
[global]
|
[global]
|
||||||
@@ -81,10 +81,8 @@ let
|
|||||||
${volume.path}
|
${volume.path}
|
||||||
accs:
|
accs:
|
||||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList renderAccess volume.access)}
|
${lib.concatStringsSep "\n" (lib.mapAttrsToList renderAccess volume.access)}
|
||||||
${lib.optionalString (volume.flags != [ ]) ''
|
flags:
|
||||||
flags:
|
${renderFlags volume.flags}
|
||||||
${renderFlags volume.flags}
|
|
||||||
''}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
renderTrustedSource = source: " xff-src: ${source}";
|
renderTrustedSource = source: " xff-src: ${source}";
|
||||||
|
|||||||
Reference in New Issue
Block a user