74 lines
2.1 KiB
Nix
74 lines
2.1 KiB
Nix
{ lib, ... }:
|
|
|
|
let
|
|
vscodeExtensions = [
|
|
"github.copilot"
|
|
"github.copilot-chat"
|
|
"ms-azuretools.vscode-containers"
|
|
"ms-dotnettools.csdevkit"
|
|
"ms-dotnettools.csharp"
|
|
"ms-dotnettools.vscode-dotnet-runtime"
|
|
"ms-vscode-remote.remote-containers"
|
|
"ms-vscode-remote.remote-ssh"
|
|
"ms-vscode-remote.remote-ssh-edit"
|
|
"ms-vscode-remote.remote-wsl"
|
|
"ms-vscode-remote.vscode-remote-extensionpack"
|
|
"ms-vscode.remote-explorer"
|
|
"ms-vscode.remote-server"
|
|
"ms-vsliveshare.vsliveshare"
|
|
];
|
|
|
|
cursorExtensions = [
|
|
"anysphere.cursorpyright"
|
|
"anysphere.remote-ssh"
|
|
"astro-build.astro-vscode"
|
|
"castwide.solargraph"
|
|
"expo.vscode-expo-tools"
|
|
"github.vscode-github-actions"
|
|
"jnoortheen.nix-ide"
|
|
"ms-dotnettools.csdevkit"
|
|
"ms-dotnettools.csharp"
|
|
"ms-dotnettools.vscode-dotnet-runtime"
|
|
"ms-python.anaconda-extension-pack"
|
|
"ms-python.debugpy"
|
|
"ms-python.python"
|
|
"msjsdiag.vscode-react-native"
|
|
"redhat.vscode-yaml"
|
|
"rust-lang.rust-analyzer"
|
|
"shopify.ruby-lsp"
|
|
];
|
|
|
|
installExtensions = editor: extensions: ''
|
|
if command -v ${editor} >/dev/null 2>&1; then
|
|
for ext in ${lib.concatStringsSep " " (map lib.escapeShellArg extensions)}; do
|
|
$DRY_RUN_CMD ${editor} --install-extension "$ext" --force >/dev/null 2>&1 || true
|
|
done
|
|
fi
|
|
'';
|
|
in
|
|
{
|
|
programs.vscode = {
|
|
enable = true;
|
|
# Allow manual extension installs from within the editor.
|
|
mutableExtensionsDir = true;
|
|
profiles.default = {
|
|
enableExtensionUpdateCheck = true;
|
|
enableUpdateCheck = true;
|
|
userSettings = {
|
|
"editor.fontSize" = 16;
|
|
"editor.fontFamily" = "'FiraCode Nerd Font Mono'";
|
|
"editor.fontLigatures" = true;
|
|
"security.workspace.trust.enabled" = false;
|
|
"remote.SSH.enableAgentForwarding" = true;
|
|
"git.enableSmartCommit" = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
home.activation.installEditorExtensions = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
# Keep your current VS Code and Cursor extensions as baseline.
|
|
${installExtensions "code" vscodeExtensions}
|
|
${installExtensions "cursor" cursorExtensions}
|
|
'';
|
|
}
|