mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
vscode: correct base path from which to pull extensions
This commit is contained in:
committed by
Robert Helgesson
parent
08094f3cc2
commit
595150be86
@@ -71,12 +71,15 @@ in
|
||||
# Adapted from https://discourse.nixos.org/t/vscode-extensions-setup/1801/2
|
||||
home.file =
|
||||
let
|
||||
toPaths = p:
|
||||
# Links every dir in p to the extension path.
|
||||
mapAttrsToList (k: v:
|
||||
{
|
||||
"${extensionPath}/${k}".source = "${p}/${k}";
|
||||
}) (builtins.readDir p);
|
||||
toPaths = path:
|
||||
let
|
||||
p = "${path}/share/vscode/extensions";
|
||||
in
|
||||
# Links every dir in p to the extension path.
|
||||
mapAttrsToList (k: v:
|
||||
{
|
||||
"${extensionPath}/${k}".source = "${p}/${k}";
|
||||
}) (builtins.readDir p);
|
||||
toSymlink = concatMap toPaths cfg.extensions;
|
||||
in
|
||||
foldr
|
||||
|
||||
Reference in New Issue
Block a user