This commit introduces the AIC8800 USB Wi-Fi driver, including firmware installation and configurable udev rules for USB disk ejection and power management. The driver supports kernel versions 6.17 and above, ensuring compatibility with recent changes in the Linux kernel. Documentation is also provided in README.md for usage and configuration.
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{
|
|
description = "AIC8800 USB Wi-Fi driver for Linux";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
in
|
|
{
|
|
packages = forAllSystems (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
aic8800-firmware = pkgs.stdenvNoCC.mkDerivation {
|
|
pname = "aic8800-firmware";
|
|
version = "2022-12-19";
|
|
src = ./.;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/lib/firmware
|
|
cp -r usr/src/AIC8800/fw/aic8800D80 $out/lib/firmware/
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with pkgs.lib; {
|
|
description = "Firmware blobs for AIC8800 USB adapters";
|
|
license = licenses.unfreeRedistributableFirmware;
|
|
platforms = platforms.linux;
|
|
};
|
|
};
|
|
}
|
|
);
|
|
|
|
nixosModules = {
|
|
default = { config, lib, pkgs, ... }: import ./nixos-module.nix {
|
|
inherit config lib pkgs;
|
|
aic8800-src = self;
|
|
};
|
|
aic8800 = { config, lib, pkgs, ... }: import ./nixos-module.nix {
|
|
inherit config lib pkgs;
|
|
aic8800-src = self;
|
|
};
|
|
};
|
|
|
|
overlays = {
|
|
default = final: prev: {
|
|
aic8800-firmware = self.packages.${prev.system}.aic8800-firmware;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|