fix(copyparty): apply volume permissions

This commit is contained in:
2026-10-12 11:54:39 -04:00
parent d0872e7d8c
commit d6fbde9230
2 changed files with 4 additions and 5 deletions

View File

@@ -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";

View File

@@ -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}";