NixOSConfig/lib/modules/unfree.nix

38 lines
982 B
Nix

{ lib, machineConfig, ... }: {
config = {
nixpkgs = {
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) (
let
names =
(lib.optional machineConfig.xone "xow_dongle-firmware") ++
(lib.optionals machineConfig.nvidia [
"cuda_cccl"
"cuda_cudart"
"cuda_cuobjdump"
"cuda_cupti"
"cuda_cuxxfilt"
"cuda_gdb"
"cuda-merged"
"cuda_nvcc"
"cuda_nvdisasm"
"cuda_nvml_dev"
"cuda_nvprune"
"cuda_nvrtc"
"cuda_nvtx"
"cuda_profiler_api"
"cuda_sanitizer_api"
"libcublas"
"libcufft"
"libcurand"
"libcusolver"
"libcusparse"
"libnpp"
"libnvjitlink"
"rar"
]);
in
names);
};
};
}