Loading nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix +4 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,8 @@ device-name-strategy, discovery-mode, mounts, disable-hooks, enable-hooks, glibc, jq, lib, Loading Loading @@ -37,7 +39,8 @@ writeScriptBin "nvidia-cdi-generator" '' } --discovery-mode ${discovery-mode} \ --device-name-strategy ${device-name-strategy} \ --disable-hook create-symlinks \ ${lib.concatMapStringsSep " \\\n" (hook: "--disable-hook ${hook}") disable-hooks} \ ${lib.concatMapStringsSep " \\\n" (hook: "--enable-hook ${hook}") enable-hooks} \ --ldconfig-path ${lib.getExe' glibc "ldconfig"} \ --library-search-path ${lib.getLib nvidia-driver}/lib \ --nvidia-cdi-hook-path ${lib.getOutput "tools" nvidia-container-toolkit}/bin/nvidia-cdi-hook \ Loading nixos/modules/services/hardware/nvidia-container-toolkit/default.nix +22 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,26 @@ package = lib.mkPackageOption pkgs "nvidia-container-toolkit" { }; disable-hooks = lib.mkOption { type = lib.types.listOf lib.types.nonEmptyStr; default = [ "create-symlinks" ]; description = '' List of hooks to disable when generating the CDI specification. Each hook name will be passed as `--disable-hook <hook-name>` to nvidia-ctk. Set to an empty list to disable no hooks. ''; }; enable-hooks = lib.mkOption { type = lib.types.listOf lib.types.nonEmptyStr; default = [ ]; description = '' List of hooks to enable when generating the CDI specification. Each hook name will be passed as `--enable-hook <hook-name>` to nvidia-ctk. Set to an empty list to enable no hooks. ''; }; extraArgs = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; Loading Loading @@ -306,6 +326,8 @@ device-name-strategy discovery-mode mounts disable-hooks enable-hooks extraArgs ; nvidia-container-toolkit = config.hardware.nvidia-container-toolkit.package; Loading Loading
nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix +4 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,8 @@ device-name-strategy, discovery-mode, mounts, disable-hooks, enable-hooks, glibc, jq, lib, Loading Loading @@ -37,7 +39,8 @@ writeScriptBin "nvidia-cdi-generator" '' } --discovery-mode ${discovery-mode} \ --device-name-strategy ${device-name-strategy} \ --disable-hook create-symlinks \ ${lib.concatMapStringsSep " \\\n" (hook: "--disable-hook ${hook}") disable-hooks} \ ${lib.concatMapStringsSep " \\\n" (hook: "--enable-hook ${hook}") enable-hooks} \ --ldconfig-path ${lib.getExe' glibc "ldconfig"} \ --library-search-path ${lib.getLib nvidia-driver}/lib \ --nvidia-cdi-hook-path ${lib.getOutput "tools" nvidia-container-toolkit}/bin/nvidia-cdi-hook \ Loading
nixos/modules/services/hardware/nvidia-container-toolkit/default.nix +22 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,26 @@ package = lib.mkPackageOption pkgs "nvidia-container-toolkit" { }; disable-hooks = lib.mkOption { type = lib.types.listOf lib.types.nonEmptyStr; default = [ "create-symlinks" ]; description = '' List of hooks to disable when generating the CDI specification. Each hook name will be passed as `--disable-hook <hook-name>` to nvidia-ctk. Set to an empty list to disable no hooks. ''; }; enable-hooks = lib.mkOption { type = lib.types.listOf lib.types.nonEmptyStr; default = [ ]; description = '' List of hooks to enable when generating the CDI specification. Each hook name will be passed as `--enable-hook <hook-name>` to nvidia-ctk. Set to an empty list to enable no hooks. ''; }; extraArgs = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; Loading Loading @@ -306,6 +326,8 @@ device-name-strategy discovery-mode mounts disable-hooks enable-hooks extraArgs ; nvidia-container-toolkit = config.hardware.nvidia-container-toolkit.package; Loading