fix(copyparty): apply volume permissions #181

Closed
alexion wants to merge 1 commits from refactor/copyparty-service-cleanup into main
2 changed files with 4 additions and 5 deletions
Showing only changes of commit d6fbde9230 - Show all commits

View File

@@ -133,6 +133,7 @@ in
// lib.mapAttrs' (
_urlPath: volume:
lib.nameValuePair volume.path {
inherit (volume) readOnly;
directory = volume.hostPath;
owner = "root";
group = "storage";

View File

@@ -42,7 +42,7 @@ let
set -eu
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
[global]
@@ -81,10 +81,8 @@ let
${volume.path}
accs:
${lib.concatStringsSep "\n" (lib.mapAttrsToList renderAccess volume.access)}
${lib.optionalString (volume.flags != [ ]) ''
flags:
${renderFlags volume.flags}
''}
flags:
${renderFlags volume.flags}
'';
renderTrustedSource = source: " xff-src: ${source}";