Allow added unfree software

This commit is contained in:
Manuel Thalmann 2024-05-08 16:16:42 +02:00
parent 157a1cf990
commit c0211a8b76
2 changed files with 38 additions and 0 deletions

View file

@ -4,6 +4,7 @@
./modules/custom-sops-nix.nix
./modules/my-users.nix
./modules/sddm.nix
./modules/unfree.nix
];
config = {

37
lib/modules/unfree.nix Normal file
View file

@ -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);
};
};
}