diff options
author | Someone <else@someonex.net> | 2024-06-27 15:56:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 15:56:29 +0000 |
commit | 35a472db576609b9247292a920d4151bafb51547 (patch) | |
tree | 4c8f3893105e65efc03c790a9a86b129fb1b3cc6 /nixos/modules/hardware | |
parent | 909955825b3a2d0ccf080b8030b9459f41e0fc29 (diff) | |
parent | 70ff2154497cc235594f01d2531a3647311a6e43 (diff) |
Merge pull request #320830 from philiptaron/nixos-nvidia-change-datacenter-defaults
nixos/nvidia: move TOPOLOGY_FILE_PATH and DATABASE_PATH into nvidia-fabricmanager service definition
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r-- | nixos/modules/hardware/video/nvidia.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 0274dfcaa70f..e38050e637b1 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -46,8 +46,6 @@ in TRUNK_LINK_FAILURE_MODE = 0; NVSWITCH_FAILURE_MODE = 0; ABORT_CUDA_JOBS_ON_FM_EXIT = 1; - TOPOLOGY_FILE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch"; - DATABASE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch"; }; defaultText = lib.literalExpression '' { @@ -69,8 +67,6 @@ in TRUNK_LINK_FAILURE_MODE=0; NVSWITCH_FAILURE_MODE=0; ABORT_CUDA_JOBS_ON_FM_EXIT=1; - TOPOLOGY_FILE_PATH="''${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch"; - DATABASE_PATH="''${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch"; } ''; description = '' @@ -628,7 +624,14 @@ in TimeoutStartSec = 240; ExecStart = let - nv-fab-conf = settingsFormat.generate "fabricmanager.conf" cfg.datacenter.settings; + # Since these rely on the `nvidia_x11.fabricmanager` derivation, they're + # unsuitable to be mentioned in the configuration defaults, but they _can_ + # be overridden in `cfg.datacenter.settings` if needed. + fabricManagerConfDefaults = { + TOPOLOGY_FILE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch"; + DATABASE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch"; + }; + nv-fab-conf = settingsFormat.generate "fabricmanager.conf" (fabricManagerConfDefaults // cfg.datacenter.settings); in "${lib.getExe nvidia_x11.fabricmanager} -c ${nv-fab-conf}"; LimitCORE = "infinity"; |