VSCode Extensions merged from all 3 sources.

This commit is contained in:
Joseph Hanson 2024-07-27 11:28:34 -05:00
parent dc484e3161
commit b31a3c940e
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -2,37 +2,33 @@
with lib; with lib;
let let
cfg = config.mySystem.editor.vscode; cfg = config.mySystem.editor.vscode;
in # VSCode Community Extensions. These are updated daily.
{ vscodeCommunityExtensions = [
options.mySystem.editor.vscode.enable = mkEnableOption "vscode"; "dracula-theme.theme-dracula"
config = mkIf cfg.enable { "esbenp.prettier-vscode"
"jnoortheen.nix-ide"
# Enable vscode & addons "mikestead.dotenv"
environment.systemPackages = with pkgs; [ "ms-azuretools.vscode-docker"
(vscode-with-extensions.override { # Python extensions *required* for redhat.ansible/vscode-yaml
vscode = unstable.vscode; "ms-python.python"
"ms-python.vscode-pylance"
vscodeExtensions = "ms-vscode-remote.remote-ssh"
[ "ms-vscode-remote.remote-ssh-edit"
vscode-extensions.dracula-theme.theme-dracula "pkief.material-icon-theme"
vscode-extensions.yzhang.markdown-all-in-one "redhat.ansible"
vscode-extensions.signageos.signageos-vscode-sops "redhat.vscode-yaml"
vscode-extensions.redhat.ansible "signageos.signageos-vscode-sops"
vscode-extensions.ms-azuretools.vscode-docker "tamasfe.even-better-toml"
vscode-extensions.mikestead.dotenv "tyriar.sort-lines"
vscode-extensions.tamasfe.even-better-toml "yzhang.markdown-all-in-one"
vscode-extensions.pkief.material-icon-theme ];
vscode-extensions.jnoortheen.nix-ide # Nixpkgs Extensions. These are updated whenver they get around to it.
vscode-extensions.ms-vscode-remote.remote-ssh vscodeNixpkgsExtensions = [
vscode-extensions.ms-vscode-remote.remote-ssh-edit # Continue ships with a binary that requires the patchelf fix which is done by default in nixpkgs.
vscode-extensions.redhat.vscode-yaml "continue.continue"
# vscode-marketplace.continue.continue ];
# vscode-marketplace.github.copilot # Straight from the VSCode marketplace.
# vscode-marketplace.github.copilot-chat marketplaceExtensions = [
vscode-extensions.continue.continue
vscode-extensions.ms-python.python
vscode-extensions.ms-python.vscode-pylance
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{ {
name = "copilot"; name = "copilot";
publisher = "github"; publisher = "github";
@ -43,9 +39,25 @@ in
name = "copilot-chat"; name = "copilot-chat";
publisher = "github"; publisher = "github";
version = "0.17.1"; version = "0.17.1";
sha256 = "sha256-Aa4gmHJCveP18v6CAvmkxmqf1JV1LygyQFNpzDz64Gw="; sha256 = "Aa4gmHJCveP18v6CAvmkxmqf1JV1LygyQFNpzDz64Gw=";
} }
]; ];
# Extract extension strings and coerce them to a list of valid attribute paths.
vscodeCommunityExtensionsPackages = map (ext: getAttrFromPath (splitString "." ext) pkgs.vscode-marketplace) vscodeCommunityExtensions;
nixpkgsExtensionsPackages = map (ext: getAttrFromPath (splitString "." ext) pkgs.vscode-extensions) vscodeNixpkgsExtensions;
marketplaceExtensionsPackages = pkgs.vscode-utils.extensionsFromVscodeMarketplace marketplaceExtensions;
in
{
options.mySystem.editor.vscode.enable = mkEnableOption "vscode";
config = mkIf cfg.enable {
# Enable vscode & addons
environment.systemPackages = with pkgs; [
(vscode-with-extensions.override {
vscode = unstable.vscode;
# Merge all the extension packages together.
vscodeExtensions =
vscodeCommunityExtensionsPackages ++ nixpkgsExtensionsPackages ++ marketplaceExtensionsPackages;
}) })
]; ];
}; };