From dec9f2f575f4aad3c420eaf2493c1040c143879a Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 29 May 2026 10:15:28 -0400 Subject: fix nvidia reflex --- system/default.nix | 1 + system/nvidia.nix | 42 ++++++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/system/default.nix b/system/default.nix index 2f5bd59..0d4f0e2 100644 --- a/system/default.nix +++ b/system/default.nix @@ -163,6 +163,7 @@ in { info.enable = false; man = { enable = true; + man-db.enable = true; cache.enable = false; }; nixos.enable = false; diff --git a/system/nvidia.nix b/system/nvidia.nix index 909575f..f3dd1de 100644 --- a/system/nvidia.nix +++ b/system/nvidia.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - inherit (lib) mkIf optionals; + inherit (lib) mkMerge mkIf optionals; cfg = config.nvidia; in { config = mkIf cfg.enable { @@ -43,23 +43,29 @@ in { low-latency-layer ]; - # cuda - environment = mkIf cfg.cuda.enable { - systemPackages = with pkgs; [ - cudaPackages.cuda_cudart - cudaPackages.cudnn - cudatoolkit - ]; - variables = { - NVIDIA_VISIBLE_DEVICES = "all"; - NVIDIA_DRIVER_CAPABILITIES = "compute,utility"; - CUDA_VISIBLE_DEVICES = 0; - CUDA_PATH = "${pkgs.cudatoolkit}"; - # NVIDIA Reflex - LOW_LATENCY_LAYER = "1"; - LOW_LATENCY_LAYER_REFLEX = "1"; - }; - }; + environment = mkMerge [ + { + variables = { + # NVIDIA Reflex + LOW_LATENCY_LAYER = "1"; + LOW_LATENCY_LAYER_REFLEX = "1"; + }; + } + # cuda + (mkIf cfg.cuda.enable { + systemPackages = with pkgs; [ + cudaPackages.cuda_cudart + cudaPackages.cudnn + cudatoolkit + ]; + variables = { + NVIDIA_VISIBLE_DEVICES = "all"; + NVIDIA_DRIVER_CAPABILITIES = "compute,utility"; + CUDA_VISIBLE_DEVICES = 0; + CUDA_PATH = "${pkgs.cudatoolkit}"; + }; + }) + ]; nix.settings = mkIf cfg.cuda.enable { substituters = ["https://cache.nixos-cuda.org"]; trusted-public-keys = ["cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="]; -- cgit v1.3.1-freya