diff --git a/modules/devices.nix b/modules/devices.nix index 52fb1e4c..bf215f41 100644 --- a/modules/devices.nix +++ b/modules/devices.nix @@ -35,9 +35,13 @@ let (lib.concatLines (map # all files in linux-firmware are read-only (firmwarePath: '' - install -Dm0444 \ - --target-directory=$(dirname $out/lib/firmware/${firmwarePath}) \ - $(realpath ${pkgs.linux-firmware}/lib/firmware/${firmwarePath}) + if [[ -f $(realpath ${pkgs.linux-firmware}/lib/firmware/${firmwarePath}) ]]; then + install -Dm0444 \ + --target-directory=$(dirname $out/lib/firmware/${firmwarePath}) \ + $(realpath ${pkgs.linux-firmware}/lib/firmware/${firmwarePath}) + else + echo "WARNING: lib/firmware/${firmwarePath} does not exist in linux-firmware ${pkgs.linux-firmware.version}" + fi '' ) paths)));