From 1e05500e9b8c8ba79748f49aebc4ccfb95a157db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20M=C3=A9meint?= Date: Fri, 31 Oct 2025 19:11:31 +0100 Subject: [PATCH] nixos: Use volume/global chmod-d for module directory creation --- contrib/nixos/modules/copyparty.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index ed183fb9..1139a380 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -364,7 +364,17 @@ in #: in front of things means it wont change it if the directory already exists. group = ":${cfg.group}"; user = ":${cfg.user}"; - mode = ":755"; + mode = ":${ + # Use volume permissions if set + if (value.flags ? chmod_d) then + value.flags.chmod_d + # Else, use global permission if set + else if (cfg.settings ? chmod-d) then + cfg.settings.chmod-d + # Else, use the default permission + else + "755" + }"; }; } ) cfg.volumes