diff --git a/flake.nix b/flake.nix index 2b0fddc..f079a70 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,6 @@ in { agenix = agenix.packages.${config.nixpkgs.hostPlatform.system}.default; nur = (import sources.nur { inherit pkgs; }); - vscode-extensions = (import sources.nix-vscode-extensions).extensions.x86_64-linux; # TODO: This should check the host architecture }; }; diff --git a/home/vscode.nix b/home/vscode.nix index bb4c548..d081191 100644 --- a/home/vscode.nix +++ b/home/vscode.nix @@ -2,16 +2,27 @@ let inherit (lib) mkIf; + inherit (pkgs) fetchFromGitHub; + system = "x86_64-linux"; # TODO: This should check the host architecture + extensions = + (import (fetchFromGitHub { + # On a stable channel, do NOT keep this up-to-date! VS Code extensions + # have breaking changes more frequently than the NixOS release cadence. + owner = "nix-community"; + repo = "nix-vscode-extensions"; + rev = "27ce569a199d2da1a8483fe3d69dd41664da3a63"; + hash = "sha256-yyB4Kh3EFbYP+1JHza/IEeHwABypcYVi6vvWTmad/rY="; + })).extensions.${system}; in { programs.vscode = { enableExtensionUpdateCheck = false; enableUpdateCheck = false; package = pkgs.vscodium; - extensions = with pkgs.vscode-extensions; [ - open-vsx.golang.go - open-vsx.jdinhlife.gruvbox - open-vsx.jnoortheen.nix-ide - open-vsx.ms-python.python + extensions = with extensions.open-vsx; [ + golang.go + jdinhlife.gruvbox + jnoortheen.nix-ide + ms-python.python ]; mutableExtensionsDir = false; userSettings = { diff --git a/npins/sources.json b/npins/sources.json index 779ac9c..7110f10 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1,17 +1,5 @@ { "pins": { - "nix-vscode-extensions": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "nix-vscode-extensions" - }, - "branch": "master", - "revision": "27ce569a199d2da1a8483fe3d69dd41664da3a63", - "url": "https://github.com/nix-community/nix-vscode-extensions/archive/27ce569a199d2da1a8483fe3d69dd41664da3a63.tar.gz", - "hash": "1dpykmk4xmpvx9i8awd93h0g1q8ir2pwsisjzc7vc5f43lm7h86b" - }, "nur": { "type": "Git", "repository": {