From 62a60b82dc149d59c286ef22ccac6e75268cb5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 17 Nov 2024 09:08:53 +0100 Subject: [PATCH] remove code duplication --- programs/editors/vscode/default.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/programs/editors/vscode/default.nix b/programs/editors/vscode/default.nix index 30d2f0e9..fde8bff9 100644 --- a/programs/editors/vscode/default.nix +++ b/programs/editors/vscode/default.nix @@ -80,22 +80,14 @@ "L /persistent${config.xdg.dataHome}/Code/DawnGraphiteCache - - - - ${config.xdg.cacheHome}/Code/DawnGraphiteCache" "L ${config.xdg.configHome}/Code - - - - ${config.xdg.dataHome}/Code" ] + # GPU Cache sometimes breaks for electron apps on intel, so only persist that on non-intel (lib.mkIf (!systemConfig.isIntelGPU) [ - # GPU Cache sometimes breaks for electron apps on intel - "d /persistent${config.xdg.cacheHome}/Code/DawnWebGPUCache - - - - -" - "d /persistent${config.xdg.cacheHome}/Code/GPUCache - - - - -" - "L /persistent${config.xdg.dataHome}/Code/DawnWebGPUCache - - - - ${config.xdg.cacheHome}/Code/DawnWebGPUCache" - "L /persistent${config.xdg.dataHome}/Code/GPUCache - - - - ${config.xdg.cacheHome}/Code/GPUCache" - ]) - (lib.mkIf (!systemConfig.isIntelGPU) [ - # GPU Cache sometimes breaks for electron apps on intel "d /persistent${config.xdg.cacheHome}/Code/DawnWebGPUCache - - - - -" "d /persistent${config.xdg.cacheHome}/Code/GPUCache - - - - -" "L /persistent${config.xdg.dataHome}/Code/DawnWebGPUCache - - - - ${config.xdg.cacheHome}/Code/DawnWebGPUCache" "L /persistent${config.xdg.dataHome}/Code/GPUCache - - - - ${config.xdg.cacheHome}/Code/GPUCache" ]) (lib.mkIf (systemConfig.isIntelGPU) [ - # GPU Cache sometimes breaks for electron apps on intel "d /tmp${config.xdg.cacheHome}/Code/DawnWebGPUCache - - - - -" "d /tmp${config.xdg.cacheHome}/Code/GPUCache - - - - -" "L /persistent${config.xdg.dataHome}/Code/DawnWebGPUCache - - - - /tmp${config.xdg.cacheHome}/Code/DawnWebGPUCache"