Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiles/t2-macbook: Use iwd as default backend for NetworkManager #155

Merged
merged 3 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions profiles/pci/network_drivers/profiles.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ blacklist brcm80211
blacklist brcmfmac
blacklist brcmsmac
blacklist bcma
EOF
cat <<EOF >/etc/NetworkManager/conf.d/50-iwd.conf
# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT.
[device]
wifi.backend=iwd
EOF
mkinitcpio -P

"""
post_remove = """
rm -f /etc/modprobe.d/01-chwd-net-blacklist.conf
rm -f /etc/NetworkManager/conf.d/50-iwd.conf
mkinitcpio -P
"""
10 changes: 8 additions & 2 deletions profiles/pci/t2-macbook/profiles.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ priority = 9
class_ids = "0000"
vendor_ids = "106b"
device_ids = "1801 1802"
packages = 'apple-t2-audio-config tiny-dfr t2fanrd'
packages = 'apple-t2-audio-config tiny-dfr t2fanrd iwd'
post_install = """
cat <<EOF >/etc/mkinitcpio.conf.d/11-chwd.conf
# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT.
Expand All @@ -28,11 +28,17 @@ EOF
grub-mkconfig -o /boot/grub/grub.cfg
fi


cat <<EOF >/etc/NetworkManager/conf.d/50-iwd.conf
# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT.
[device]
wifi.backend=iwd
EOF
"""
post_remove = """
rm -f /etc/mkinitcpio.conf.d/11-chwd.conf
rm -f /etc/NetworkManager/conf.d/50-iwd.conf
rm -f /etc/modules-load.d/t2.conf

mkinitcpio -P
kernelparams="intel_iommu=on iommu=pt pcie_ports=compat"
echo "Removing kernel parameters..."
Expand Down
3 changes: 1 addition & 2 deletions scripts/chwd
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ local function parse_profiles(path)
while line do
local profile_found = line:match(profile_name_pattern)

if profile_found then
if profile_found and not captured_hook then
profile = profile_found
profiles[profile] = {
["packages"] = nil,
Expand All @@ -217,7 +217,6 @@ local function parse_profiles(path)
["conditional_packages"] = ""
}
}
captured_hook = nil
else
if profile then
if not profiles[profile].packages then
Expand Down
Loading