From 2a50a895ef69695b4d92cbfaebe80ad8e6767f82 Mon Sep 17 00:00:00 2001 From: william1209 Date: Mon, 23 Dec 2024 02:38:42 +0800 Subject: [PATCH] fix btop not show gpu --- home/programs/shell/zsh.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/home/programs/shell/zsh.nix b/home/programs/shell/zsh.nix index d1a40db..526f6f6 100644 --- a/home/programs/shell/zsh.nix +++ b/home/programs/shell/zsh.nix @@ -48,6 +48,18 @@ in { lib.concatStringsSep ":" config.home.sessionPath }" ''; + + #NOTE: for btop to show gpu usage + #may want to check the driver version with: + #nix path-info -r /run/current-system | grep nvidia-x11 + #and + #nix search nixpkgs nvidia_x11 + sessionVariables = { + LD_LIBRARY_PATH = lib.concatStringsSep ":" [ + "${pkgs.linuxPackages_latest.nvidia_x11_beta}/lib" #change the package name according to nix search result + "$LD_LIBRARY_PATH" + ]; + }; shellAliases = { vim = "nvim";