mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 09:43:30 +01:00
This adds automatic network configuration based on detected hardware: - networking/default.nix: Auto-configure DHCP on physical interfaces Detects Ethernet, WLAN, USB-Link, and generic network interfaces, automatically enabling DHCP on each. Excludes loopback and mainframe interfaces. Sets networking.useDHCP and per-interface useDHCP. - networking/intel.nix: Intel WiFi firmware detection Auto-enables firmware for Intel 2200BG and 3945ABG wireless cards based on PCI vendor/device IDs. - networking/initrd.nix: Network drivers in initrd Loads network controller drivers when boot.initrd.network.enable is set, enabling network boot scenarios. Builds on PR #454847 (boot & storage). Part of incremental upstreaming from nixos-facter-modules.
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
./disk.nix
|
|
./keyboard.nix
|
|
./networking
|
|
./system.nix
|
|
];
|
|
|
|
meta.maintainers = with lib.maintainers; [ mic92 ];
|
|
|
|
options.hardware.facter = with lib; {
|
|
report = mkOption {
|
|
type = types.attrsOf types.anything;
|
|
default =
|
|
if config.hardware.facter.reportPath == null then
|
|
{ }
|
|
else
|
|
builtins.fromJSON (builtins.readFile config.hardware.facter.reportPath);
|
|
defaultText = "A JSON import from config.hardware.facter.reportPath (if not null), {} otherwise.";
|
|
description = ''
|
|
Hardware report data generated by nixos-facter.
|
|
|
|
See <https://nix-community.github.io/nixos-facter/> for more information.
|
|
'';
|
|
};
|
|
|
|
reportPath = mkOption {
|
|
type = types.nullOr types.path;
|
|
default = null;
|
|
description = ''
|
|
Path to a hardware report generated by nixos-facter.
|
|
|
|
To generate a report, run the following as root:
|
|
```
|
|
nix-shell -p nixos-facter --run nixos-facter > facter.json
|
|
```
|
|
|
|
See <https://nix-community.github.io/nixos-facter/> for more information.
|
|
'';
|
|
};
|
|
};
|
|
}
|