Skip to content

Commit

Permalink
refactor: migrate vscode as home-manager package
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikoTan committed Dec 17, 2023
1 parent 947a863 commit 67fd488
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 25 deletions.
1 change: 0 additions & 1 deletion modules/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
vim
wget
git
(callPackage ./vscode/default.nix {})
# Fonts
noto-fonts
noto-fonts-cjk-sans
Expand Down
5 changes: 5 additions & 0 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{ config, pkgs, ... }:

{
imports =
[
./vscode/default.nix
];

home.username = "maiko";
home.homeDirectory = "/home/maiko";

Expand Down
35 changes: 35 additions & 0 deletions modules/home-manager/vscode/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ pkgs, ... }:

{
programs.vscode = {
enable = true;
enableExtensionUpdateCheck = false;
package = (pkgs.vscode.override { isInsiders = true; }).overrideAttrs (oldAttrs: rec {
src = (builtins.fetchTarball {
url = "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64";
sha256 = "023ryfx9zj7d7ghh41xixsz3yyngc2y6znkvfsrswcij67jqm8cd";
});
version = "latest";

buildInputs = oldAttrs.buildInputs ++ [ pkgs.krb5 ];
});

extensions = with pkgs.vscode-extensions; [
WakaTime.vscode-wakatime
rust-lang.rust-analyzer
jnoortheen.nix-ide
eamodio.gitlens
github.copilot
bbenoist.nix
mkhl.direnv
golang.go
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "volar";
publisher = "Vue";
version = "1.8.25";
sha256 = "3RQ8dBy83QblARNMjy5RliVYSxEUdJA/3yyWcLK0wVQ=";
}
];
};
}
24 changes: 0 additions & 24 deletions modules/vscode/default.nix

This file was deleted.

0 comments on commit 67fd488

Please sign in to comment.