From 763385e337983c08cfd2328d8fb2e9de672ec063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Wed, 13 Nov 2024 15:46:14 +0100 Subject: [PATCH] add rust extensions --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 6 ++++++ modules/default.nix | 2 ++ programs/editors/vscode/default.nix | 20 ++++++++++++++------ 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 2eab6a73..fe994a37 100644 --- a/flake.lock +++ b/flake.lock @@ -206,6 +206,32 @@ "url": "https://git.lix.systems/lix-project/nixos-module" } }, + "nix-vscode-extensions": { + "inputs": { + "flake-compat": [ + "flake-compat" + ], + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1731462465, + "narHash": "sha256-SL/d2lvJO+CDzQno7sOyUuktE7+o6kW1qpWsG8tBte4=", + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "rev": "ac80fc4a7e7604c5699cbe61839af03bd55bf7bf", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "type": "github" + } + }, "nix2container": { "inputs": { "flake-utils": [ @@ -371,6 +397,7 @@ "impermanence": "impermanence", "lix": "lix", "lix-module": "lix-module", + "nix-vscode-extensions": "nix-vscode-extensions", "nix2container": "nix2container", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 80b444b7..210016d9 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,12 @@ inputs.lix.follows = "lix"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-vscode-extensions = { + url = "github:nix-community/nix-vscode-extensions"; + inputs.flake-compat.follows = "flake-compat"; + inputs.flake-utils.follows = "flake-utils"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nix2container = { url = "github:nlewo/nix2container"; inputs.flake-utils.follows = "flake-utils"; diff --git a/modules/default.nix b/modules/default.nix index ba484777..40a87e14 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -5,6 +5,7 @@ inTester, self, rust-overlay, + nix-vscode-extensions, ... }: with lib; @@ -29,6 +30,7 @@ with lib; nixpkgs.overlays = [ self.overlays.default (import rust-overlay) + nix-vscode-extensions.overlays.default ]; } else diff --git a/programs/editors/vscode/default.nix b/programs/editors/vscode/default.nix index 7311ea7a..c9a31c19 100644 --- a/programs/editors/vscode/default.nix +++ b/programs/editors/vscode/default.nix @@ -8,12 +8,20 @@ enableExtensionUpdateCheck = false; enableUpdateCheck = false; mutableExtensionsDir = false; - extensions = with pkgs.vscode-extensions; [ - jnoortheen.nix-ide - mkhl.direnv - pkief.material-icon-theme - signageos.signageos-vscode-sops - ]; + extensions = + (with pkgs.vscode-extensions; [ + fill-labs.dependi + jnoortheen.nix-ide + mkhl.direnv + pkief.material-icon-theme + rust-lang.rust-analyzer + signageos.signageos-vscode-sops + tamasfe.even-better-toml + vadimcn.vscode-lldb + ]) + ++ (with pkgs.vscode-marketplace; [ + jscearcy.rust-doc-viewer + ]); userSettings = { "editor.fontFamily" = "\"Fira Code\", \"Fira Code Nerd Font Mono\", monospace"; "editor.fontLigatures" = true;