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.