From 70135317153d0dd45422436aaacb3dcf4a8e370b Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Thu, 5 Jun 2025 13:46:20 +0200 Subject: [PATCH] move LD_LIBRARY_PATH Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> Former-commit-id: 5a35789f8cc7009e3310d49b27381b84aca0a475 --- home/programs/shell/zsh.nix | 12 ------------ nixos/nvidia.nix | 9 +++++++++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/home/programs/shell/zsh.nix b/home/programs/shell/zsh.nix index d22d110..34a7338 100644 --- a/home/programs/shell/zsh.nix +++ b/home/programs/shell/zsh.nix @@ -29,18 +29,6 @@ in { }" ''; - # CHANGEME: 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"; vi = "nvim"; diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix index 231d6f2..ae4f475 100644 --- a/nixos/nvidia.nix +++ b/nixos/nvidia.nix @@ -94,6 +94,15 @@ in { ]; }; + programs.zsh = { + sessionVariables = { + LD_LIBRARY_PATH = lib.concatStringsSep ":" [ + "$LD_LIBRARY_PATH" + "${nvidiaDriverChannel}/lib" # change the package name according to nix search result + ]; + }; + }; + # Additional useful packages environment.systemPackages = with pkgs; [ vulkan-tools