2022-10-18 23:28:07 +02:00
|
|
|
{ lib, pkgs, config, ...}:
|
|
|
|
let
|
|
|
|
inherit (lib) mkEnableOption mkOption types isDerivation hasAttr ;
|
|
|
|
inherit (pkgs.pseudofile) dir symlink;
|
2023-03-10 19:40:45 +01:00
|
|
|
inherit (pkgs) stdenv wireless-regdb;
|
2023-03-07 22:32:21 +01:00
|
|
|
regulatory = stdenv.mkDerivation {
|
|
|
|
name = "regulatory.db";
|
|
|
|
phases = ["installPhase"];
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp ${wireless-regdb}/lib/firmware/regulatory.db $out/
|
|
|
|
'';
|
|
|
|
};
|
2022-10-18 23:28:07 +02:00
|
|
|
in {
|
|
|
|
config = {
|
2023-03-07 22:32:21 +01:00
|
|
|
filesystem = dir {
|
|
|
|
lib = dir {
|
|
|
|
firmware = dir {
|
|
|
|
"regulatory.db" = symlink "${regulatory}/regulatory.db";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-03-10 19:40:45 +01:00
|
|
|
programs.busybox.applets = [
|
|
|
|
"insmod" "rmmod"
|
|
|
|
];
|
2022-10-18 23:28:07 +02:00
|
|
|
kernel = rec {
|
2022-10-19 23:09:38 +02:00
|
|
|
config = {
|
2023-02-22 19:41:41 +01:00
|
|
|
# Most of this is necessary infra to allow wireless stack/
|
|
|
|
# drivers to be built as module
|
|
|
|
ASN1 = "y";
|
|
|
|
ASYMMETRIC_KEY_TYPE = "y";
|
|
|
|
ASYMMETRIC_PUBLIC_KEY_SUBTYPE = "y";
|
|
|
|
CRC_CCITT = "y";
|
|
|
|
CRYPTO = "y";
|
|
|
|
CRYPTO_ARC4 = "y";
|
|
|
|
CRYPTO_CBC = "y";
|
|
|
|
CRYPTO_CCM = "y";
|
|
|
|
CRYPTO_CMAC = "y";
|
|
|
|
CRYPTO_GCM = "y";
|
|
|
|
CRYPTO_HASH_INFO = "y";
|
|
|
|
CRYPTO_USER_API = "y"; # ARC4 needs this
|
|
|
|
CRYPTO_USER_API_HASH = "y";
|
|
|
|
CRYPTO_USER_API_ENABLE_OBSOLETE = "y"; # ARC4 needs this
|
|
|
|
CRYPTO_LIB_ARC4 = "y"; # for WEP
|
|
|
|
CRYPTO_RSA = "y";
|
|
|
|
CRYPTO_SHA1 = "y";
|
|
|
|
ENCRYPTED_KEYS = "y";
|
|
|
|
KEYS = "y";
|
2024-02-12 21:41:10 +01:00
|
|
|
|
|
|
|
WLAN = "y";
|
|
|
|
CFG80211 = "m";
|
|
|
|
MAC80211 = "m";
|
|
|
|
EXPERT = "y";
|
|
|
|
CFG80211_CERTIFICATION_ONUS = "y";
|
|
|
|
CFG80211_REQUIRE_SIGNED_REGDB = "n"; # depends on ONUS
|
|
|
|
CFG80211_CRDA_SUPPORT = "n";
|
2022-10-18 23:28:07 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|