diff --git a/archachatina.nix b/archachatina.nix index 3794b9a..9072d84 100644 --- a/archachatina.nix +++ b/archachatina.nix @@ -13,6 +13,7 @@ ./atmega.nix ./v4l2loopback.nix ./huion.nix + ./rtl8761b.nix ]; environment.etc."lvm/lvm.conf".text = '' diff --git a/rtl8761b.nix b/rtl8761b.nix new file mode 100644 index 0000000..5f3351a --- /dev/null +++ b/rtl8761b.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + + hardware.firmware = with pkgs; [ (stdenv.mkDerivation rec { + name = "rtl8761b-fw"; + + fw = fetchurl { + url = "https://github.com/Realtek-OpenSource/android_hardware_realtek/raw/e58b611f34f2f5ff57bb0d8cdf1b2e4751e3ccbd/bt/rtkbt/Firmware/BT/rtl8761b_fw"; + sha256 = "0b59a1f2422c006837c4b5e46b59d49bfdbca1defb958adbbc0d57ebdc19cc82"; + }; + config = fetchurl { + url = "https://github.com/Realtek-OpenSource/android_hardware_realtek/raw/e58b611f34f2f5ff57bb0d8cdf1b2e4751e3ccbd/bt/rtkbt/Firmware/BT/rtl8761b_config"; + sha256 = "aa86a092ee58e96256331d5c28c199ceaadec434460e98e7dea20e411e1aa570"; + }; + + unpackPhase = ":"; + buildPhase = '' + dn=$out/lib/firmware + mkdir -p $dn/rtl_bt + ln -s ${fw} $dn/rtl_bt/rtl8761b_fw.bin + ln -s ${config} $dn/rtl_bt/rtl8761b_config.bin + ''; + installPhase = ":"; + }) ]; + +}