diff options
| author | tv <tv@krebsco.de> | 2026-11-26 13:18:31 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-26 13:18:31 +0000 |
| commit | 40e0d1268b0457d71f6aa946fe5ed6a5bf22c789 (patch) | |
| tree | 795494daaef87b8a36120fc53dc53363dfe589e8 /systems/qi/firmware.nix | |
| parent | 7b15342234d0f6f6b01645c294eb1eb3b543787c (diff) | |
qi: init
Diffstat (limited to 'systems/qi/firmware.nix')
| -rw-r--r-- | systems/qi/firmware.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/systems/qi/firmware.nix b/systems/qi/firmware.nix new file mode 100644 index 00000000..f8a8b524 --- /dev/null +++ b/systems/qi/firmware.nix @@ -0,0 +1,36 @@ +# Based on +# https://git.pavluk.org/chayleaf/dotfiles +# ff839c3153ba2ed6547b2c8cf5ef1f8247f6fbcd +# system/hardware/oneplus-enchilada/pkgs.nix and +# system/hardware/oneplus-enchilada/default.nix + +{ lib, pkgs, ... }: { + nixpkgs.overlays = [(self: super: { + oneplus-enchilada.firmware = + self.stdenvNoCC.mkDerivation { + name = "firmware-oneplus-sdm845"; + src = self.fetchFromGitLab { + owner = "sdm845-mainline"; + repo = "firmware-oneplus-sdm845"; + rev = "176ca713448c5237a983fb1f158cf3a5c251d775"; + hash = "sha256-ZrBvYO+MY0tlamJngdwhCsI1qpA/2FXoyEys5FAYLj4="; + }; + installPhase = '' + cp -a . "$out" + cd "$out/lib/firmware/postmarketos" + find . -type f,l | xargs -i bash -c 'mkdir -p "$(dirname "../$1")" && mv "$1" "../$1"' -- {} + cd "$out/usr" + find . -type f,l | xargs -i bash -c 'mkdir -p "$(dirname "../$1")" && mv "$1" "../$1"' -- {} + cd .. + find "$out/lib/firmware/postmarketos" "$out/usr" | tac | xargs rmdir + ''; + dontStrip = true; + # not actually redistributable, but who cares + meta.license = lib.licenses.unfreeRedistributableFirmware; + }; + })]; + + mobile.device.firmware = + # Override ${inputs.mobile-nixos}/devices/oneplus-enchilada/default.nix + lib.mkForce pkgs.oneplus-enchilada.firmware; +} |
