Skip to content

Commit

Permalink
ap-puns: only add the firmware we need to the image to save on space
Browse files Browse the repository at this point in the history
  • Loading branch information
illegalprime committed Apr 26, 2019
1 parent cb67fb3 commit e57a10d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion images/ap-puns/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{ ... }:
{ pkgs, ... }:
{
imports = [
../mini
./service.nix
];

#
# NOTE: this is built to work with the ralink 2870 chipset.
# https://www.amazon.com/150Mbps-Adapter-LOTEKOO-Wireless-Raspberry/dp/B06Y2HKT75
# to use your own WiFi dongle, add its kernel modules and firmware
#

# add the WiFi kernel modules
boot.kernelPatches = [
{
name = "ralink-chipset";
Expand All @@ -24,4 +31,12 @@
'';
}
];

# add the WiFi firmware
hardware.firmware = [
(pkgs.runCommand "rt2870" {} ''
mkdir -p $out/lib/firmware
cp ${pkgs.firmwareLinuxNonfree}/lib/firmware/rt2870.bin $out/lib/firmware/
'')
];
}

0 comments on commit e57a10d

Please sign in to comment.