Adding vscodium vith extensions and nvtop

This commit is contained in:
2025-10-05 19:39:46 +02:00
parent c4f94bf3bb
commit e9f5889194
5 changed files with 85 additions and 30 deletions

View File

@@ -1,19 +1,94 @@
{
pkgs,
lib,
...
}:
let
vscode-wrapped = pkgs.writeShellScriptBin "code" ''
export LD_LIBRARY_PATH="${pkgs.gcc.cc.lib}/lib:$LD_LIBRARY_PATH"
exec ${pkgs.vscode}/bin/.code-wrapped "$@"
open-remote-ssh = pkgs.stdenv.mkDerivation rec {
pname = "vscode-extension-open-remote-ssh";
version = "0.0.49";
vscodeExtUniqueId = "jeanp413.open-remote-ssh";
vscodeExtPublisher = "jeanp413";
src = pkgs.fetchurl {
url = "https://github.com/jeanp413/open-remote-ssh/releases/download/v${version}/open-remote-ssh-${version}.vsix";
# To obtain the correct hash, run:
# nix-prefetch-url --type sha256 https://github.com/jeanp413/open-remote-ssh/releases/download/v0.0.49/open-remote-ssh-0.0.49.vsix | xargs -I {} nix hash to-sri --type sha256 {}
# Temporarily use lib.fakeHash to have Nix give you the correct hash
# sha256 = lib.fakeHash;
# Then replace with the hash returned in the error
sha256 = "sha256-QfJnAAx+kO2iJ1EzWoO5HLogJKg3RiC3hg1/u2Jm6t4=";
};
nativeBuildInputs = [
pkgs.unzip
];
# No automatic unpacking for .vsix files
dontUnpack = true;
configurePhase = ''
runHook preConfigure
# Create a temporary directory to extract the .vsix
mkdir -p extract
cd extract
# A .vsix is a ZIP file, we decompress it
unzip -q "$src"
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
# Nothing to build, everything is precompiled in the .vsix
runHook postBuild
'';
installPhase = ''
runHook preInstall
# Create the directory structure expected by VS Code
mkdir -p "$out/share/vscode/extensions"
# The extension content is in the 'extension' folder of the .vsix
# Copy it to the directory with the name {publisher}.{name}-{version}
cp -r extension "$out/share/vscode/extensions/${vscodeExtUniqueId}"
runHook postInstall
'';
meta = {
description = "Open Remote - SSH";
homepage = "https://github.com/jeanp413/open-remote-ssh";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
};
in
{
environment.systemPackages = [
vscode-wrapped
(pkgs.vscode-with-extensions.override {
vscode = pkgs.vscodium;
vscodeExtensions = [
pkgs.vscode-extensions.continue.continue
pkgs.vscode-extensions.catppuccin.catppuccin-vsc
pkgs.vscode-extensions.catppuccin.catppuccin-vsc-icons
pkgs.vscode-extensions.jnoortheen.nix-ide
pkgs.vscode-extensions.redhat.ansible
pkgs.vscode-extensions.ms-azuretools.vscode-docker
]
++ [ open-remote-ssh ];
})
pkgs.nodejs_24
pkgs.nodePackages.npm
pkgs.gcc
pkgs.gnumake
pkgs.nixd
pkgs.nixfmt-rfc-style
pkgs.ansible
];
}

View File

@@ -1,11 +1,8 @@
{
lib,
pkgs,
config,
...
}:
let
hostname = config.networking.hostName;
in
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
@@ -23,4 +20,5 @@ in
package = config.boot.kernelPackages.nvidiaPackages.latest;
};
};
environment.systemPackages = [ pkgs.nvtopPackages.full ];
}

View File

@@ -23,24 +23,7 @@
pkgs.papirus-icon-theme
pkgs.catppuccin-cursors
pkgs.catppuccin-gtk
pkgs.vscodium
pkgs.vscode
pkgs.nixpkgs-fmt
pkgs.postman
pkgs.direnv
# vscodium
pkgs.nodejs_24
pkgs.nodePackages.npm
pkgs.nodePackages.node-gyp
pkgs.python312
pkgs.gcc
pkgs.gnumake
pkgs.pkg-config
pkgs.libsecret
pkgs.cairo
pkgs.pango
pkgs.stdenv.cc.cc.lib
];
fonts.packages = [
pkgs.nerd-fonts.dejavu-sans-mono

View File

@@ -6,7 +6,5 @@
environment.systemPackages = [
pkgs.pwgen
pkgs.ansible
pkgs.nvtopPackages.nvidia
];
}

1
result Symbolic link
View File

@@ -0,0 +1 @@
/nix/store/k6ir62f4xvynxfms4fczvv57i8mxry8n-nixos-system-home-nix-25.11.20251002.7df7ff7