diff --git a/hosts/artemis/default.nix b/hosts/artemis/default.nix index 632fc6c..80ddfba 100644 --- a/hosts/artemis/default.nix +++ b/hosts/artemis/default.nix @@ -7,15 +7,18 @@ ]; environment.systemPackages = with pkgs; [ (pkgs.vscodium.overrideAttrs (oldAttrs: { + nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ pkgs.jq ]; postInstall = (oldAttrs.postInstall or "") + '' - substituteInPlace $out/Applications/VSCodium.app/Contents/Resources/app/product.json \ - --replace '"extensionsGallery": {}' '"extensionsGallery": { - "serviceUrl": "https://visualstudio.com", - "cacheUrl": "https://windows.net", - "itemUrl": "https://visualstudio.com", - "controlUrl": "https://msecnd.net", - "recommendationsUrl": "https://visualstudio.com/recommendations" - }' + productJson=$out/Applications/VSCodium.app/Contents/Resources/app/product.json + tmp=$(mktemp) + jq '.extensionsGallery = { + serviceUrl: "https://marketplace.visualstudio.com/_apis/public/gallery", + cacheUrl: "https://vscode.blob.core.windows.net/gallery/index", + itemUrl: "https://marketplace.visualstudio.com/items", + controlUrl: "", + recommendationsUrl: "" + }' "$productJson" > "$tmp" + mv "$tmp" "$productJson" ''; })) git