From e460adf045d4a4bca869144f6a1add96d0ff65d7 Mon Sep 17 00:00:00 2001 From: dawn Date: Mon, 20 Jul 2026 21:10:09 +0300 Subject: [PATCH] flake,appview: keep devshell asset copies out of the working copy Signed-off-by: dawn --- appview/pages/static/.gitignore | 3 +++ flake.nix | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 appview/pages/static/.gitignore diff --git a/appview/pages/static/.gitignore b/appview/pages/static/.gitignore new file mode 100644 index 00000000..101eade6 --- /dev/null +++ b/appview/pages/static/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!topbar-search.js diff --git a/flake.nix b/flake.nix index 0719bedd..6f55b949 100644 --- a/flake.nix +++ b/flake.nix @@ -469,14 +469,17 @@ shellHook = '' export CC=${pkgs.stdenv.cc}/bin/cc export NODE_PATH=${tailwindcss-plugins}''${NODE_PATH:+:$NODE_PATH} - 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,mode ${packages'.appview-static-files}/* appview/pages/static - mkdir -p web/static - rm -rf web/static/fonts web/static/logos - cp -fr --no-preserve=ownership,mode ${packages'.web-static-files}/* web/static + ( + cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" + 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,mode ${packages'.appview-static-files}/* appview/pages/static + mkdir -p web/static + rm -rf web/static/fonts web/static/logos + cp -fr --no-preserve=ownership,mode ${packages'.web-static-files}/* web/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}')" # Make xcrun (Nix stub) able to find ld from the system Command Line Tools. -- 2.51.2