vscode: fix extensions directory path

Fixes #1302
PR #1327
This commit is contained in:
Zsolt Szende 2020-06-13 17:01:29 +01:00 committed by Robert Helgesson
parent 478022afad
commit 507e446475
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -77,12 +77,13 @@ in
# Adapted from https://discourse.nixos.org/t/vscode-extensions-setup/1801/2
home.file =
let
subDir = "share/vscode/extensions";
toPaths = path:
# Links every dir in path to the extension path.
mapAttrsToList (k: v:
mapAttrsToList (k: _:
{
"${extensionPath}/${k}".source = "${path}/${k}";
}) (builtins.readDir path);
"${extensionPath}/${k}".source = "${path}/${subDir}/${k}";
}) (builtins.readDir (path + "/${subDir}"));
toSymlink = concatMap toPaths cfg.extensions;
in
foldr