Skip to content

Commit

Permalink
fix(networking): default vendor and device to {}
Browse files Browse the repository at this point in the history
Closes #54
  • Loading branch information
brianmcgee authored and mergify[bot] committed Nov 4, 2024
1 parent 3801c87 commit 5db1750
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions modules/nixos/networking/broadcom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ in
full_mac.enable = mkEnableOption "Enable the Facter Broadcom Full MAC module" // {

default = lib.any (
{ vendor, device, ... }:
{
vendor ? { },
device ? { },
...
}:
# vendor (0x14e4) Broadcom Inc. and subsidiaries
(vendor.value or 0) == 5348
&& (lib.elem (device.value or 0) [
Expand Down Expand Up @@ -36,7 +40,11 @@ in
sta.enable = mkEnableOption "Enable the Facter Broadcom STA module" // {

default = lib.any (
{ vendor, device, ... }:
{
vendor ? { },
device ? { },
...
}:
# vendor (0x14e4) Broadcom Inc. and subsidiaries
(vendor.value or 0) == 5348
&& (lib.elem (device.value or 0) [
Expand Down
12 changes: 10 additions & 2 deletions modules/nixos/networking/intel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ in
_2200BG.enable = mkEnableOption "Enable the Facter Intel 2200BG module" // {

default = lib.any (
{ vendor, device, ... }:
{
vendor ? { },
device ? { },
...
}:
# vendor (0x8086) Intel Corp.
(vendor.value or 0) == 32902
&& (lib.elem (device.value or 0) [
Expand All @@ -26,7 +30,11 @@ in
_3945ABG.enable = mkEnableOption "Enable the Facter Intel 3945ABG module" // {

default = lib.any (
{ vendor, device, ... }:
{
vendor ? { },
device ? { },
...
}:
# vendor (0x8086) Intel Corp.
(vendor.value or 0) == 32902
&& (lib.elem (device.value or 0) [
Expand Down

0 comments on commit 5db1750

Please sign in to comment.