From 904c984bda0df52d335e812d3c84ea2176ef4a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20M=C3=A9meint?= Date: Sun, 2 Nov 2025 13:59:48 +0100 Subject: [PATCH] nixos: Only create and bind volumes without variables (#962) --- contrib/nixos/modules/copyparty.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index 1139a380..6bb51b68 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -48,6 +48,8 @@ let accountsWithPlaceholders = mapAttrs (name: attrs: passwordPlaceholder name); + volumesWithoutVariables = filterAttrs (k: v: !(hasInfix "\${" v.path)) cfg.volumes; + configStr = '' ${mkSection "global" cfg.settings} ${cfg.globalExtraConfig} @@ -325,7 +327,7 @@ in BindPaths = (if cfg.settings ? hist then [ cfg.settings.hist ] else [ ]) ++ [ externalStateDir ] - ++ (mapAttrsToList (k: v: v.path) cfg.volumes); + ++ (mapAttrsToList (k: v: v.path) volumesWithoutVariables); # ProtectSystem = "strict"; # Note that unlike what 'ro' implies, # this actually makes it impossible to read anything in the root FS, @@ -377,7 +379,7 @@ in }"; }; } - ) cfg.volumes + ) volumesWithoutVariables ); users.groups = lib.mkIf (cfg.group == "copyparty") {