move regulatory.db to wlan module

This commit is contained in:
Daniel Barlow 2023-03-07 21:32:21 +00:00
parent b65a405a43
commit e8d5e4c788
3 changed files with 18 additions and 5 deletions

View file

@ -2,9 +2,24 @@
let
inherit (lib) mkEnableOption mkOption types isDerivation hasAttr ;
inherit (pkgs.pseudofile) dir symlink;
inherit (pkgs) busybox;
inherit (pkgs) stdenv busybox wireless-regdb;
regulatory = stdenv.mkDerivation {
name = "regulatory.db";
phases = ["installPhase"];
installPhase = ''
mkdir -p $out
cp ${wireless-regdb}/lib/firmware/regulatory.db $out/
'';
};
in {
config = {
filesystem = dir {
lib = dir {
firmware = dir {
"regulatory.db" = symlink "${regulatory}/regulatory.db";
};
};
};
kernel = rec {
config = {
# Most of this is necessary infra to allow wireless stack/