diff --git a/lib/configuration.nix b/lib/configuration.nix index 1138829..2ee9489 100644 --- a/lib/configuration.nix +++ b/lib/configuration.nix @@ -4,6 +4,7 @@ ./modules/custom-sops-nix.nix ./modules/my-users.nix ./modules/sddm.nix + ./modules/unfree.nix ]; config = { diff --git a/lib/modules/unfree.nix b/lib/modules/unfree.nix new file mode 100644 index 0000000..c65ba7c --- /dev/null +++ b/lib/modules/unfree.nix @@ -0,0 +1,37 @@ +{ 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); + }; + }; +}