From 2286c0574b371e88ef0efe24f34b589ce2333531 Mon Sep 17 00:00:00 2001 From: Alessio Caiazza Date: Tue, 10 Mar 2026 08:06:07 +0000 Subject: [PATCH] flake/devshell: avoid read-only mode on copied appview static files The devshell copied assets from the Nix store with preserved mode bits, which left files in appview/pages/static read-only and caused repeated cp permission errors on subsequent nix develop runs. Stop preserving mode so generated static files remain writable across shell entries. AI-assisted: OpenCode (openai/gpt-5.3-codex) Signed-off-by: Alessio Caiazza --- flake.nix | 6 ++++-- 1 file(s) changed, 4 insertion(s)(+), 2 deletion(s)(-) diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -191,8 +191,10 @@ packages'.treefmt-wrapper ]; shellHook = '' mkdir -p appview/pages/static + # temporary self-heal for workspaces that copied static assets as read-only + [ -d appview/pages/static/icons ] && [ ! -w appview/pages/static/icons ] && chmod -R u+rwX appview/pages/static # no preserve is needed because watch-tailwind will want to be able to overwrite - cp -fr --no-preserve=ownership ${packages'.appview-static-files}/* appview/pages/static + cp -fr --no-preserve=ownership,mode ${packages'.appview-static-files}/* appview/pages/static export TANGLED_OAUTH_CLIENT_KID="$(date +%s)" export TANGLED_OAUTH_CLIENT_SECRET="$(${packages'.goat}/bin/goat key generate -t P-256 | grep -A1 "Secret Key" | tail -n1 | awk '{print $1}')" ''; @@ -224,7 +226,7 @@ type = "app"; program = toString (pkgs.writeShellScript "watch-appview" '' echo "copying static files to appview/pages/static..." mkdir -p appview/pages/static - ${pkgs.coreutils}/bin/cp -fr --no-preserve=ownership ${packages'.appview-static-files}/* appview/pages/static + ${pkgs.coreutils}/bin/cp -fr --no-preserve=ownership,mode ${packages'.appview-static-files}/* appview/pages/static ${air-watcher "appview" ""}/bin/run ''); }; -- tangled.sh