From 4d3f9c71d2d27da14655b021325bf735c3e03ed8 Mon Sep 17 00:00:00 2001 From: Melorise <0d00@0721.hk> Date: Wed, 29 Jul 2026 14:06:11 +0800 Subject: [PATCH] fix: expose host GPU utilities to services --- nix/module.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nix/module.nix b/nix/module.nix index 7350701..a3081ea 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -6,6 +6,10 @@ let cfg = config.services.nPanel; packageForSystem = self.packages.${pkgs.stdenv.hostPlatform.system}.default; + # GPU driver utilities belong to the active NixOS generation. They cannot be + # selected from nixpkgs here because they must match the host's configured + # NVIDIA driver. + hostRuntimeBin = "/run/current-system/sw/bin"; toolPath = lib.makeBinPath [ pkgs.bash pkgs.coreutils @@ -94,7 +98,7 @@ EOF Group = "root"; SupplementaryGroups = [ "docker" ]; WorkingDirectory = "/var/lib/npanel"; - Environment = [ "PATH=${toolPath}" ]; + Environment = [ "PATH=${hostRuntimeBin}:${toolPath}" ]; # The process sees fixed compatibility paths. Custom locations are bound # into that view; default locations need no self-bind mount.