nix-home/kagami-air-m1/m1-support/firmware/default.nix
2022-10-21 13:20:07 +02:00

19 lines
463 B
Nix

{ config, pkgs, lib, ... }:
{
hardware.firmware = [
(pkgs.stdenvNoCC.mkDerivation {
name = "firmware";
buildCommand = ''
mkdir -p $out/lib/firmware
FIRMWARE='${./firmware.tar}'
if [ -e "$FIRMWARE" ]; then
tar xf "$FIRMWARE" -C $out/lib/firmware
else
# stop nixos infra from breaking when it doesn't have any firmware
touch $out/lib/firmware/.dummy
fi
'';
})
];
}