Skip to content

Commit

Permalink
Merge pull request #51 from britter/configure-DHCP
Browse files Browse the repository at this point in the history
networking: Add default value for DHCP
  • Loading branch information
Mic92 authored Nov 4, 2024
2 parents 02c9bfa + 84e8b2a commit 8840660
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/nixos/networking/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{ config, lib, ... }:
{
imports = [
./broadcom.nix
./intel.nix
];

options.facter.detected.dhcp.enable = lib.mkEnableOption "Facter dhcp module" // {
default = builtins.length config.facter.report.network_interface or [ ] > 0;
};
config = lib.mkIf config.facter.detected.dhcp.enable {
networking.useDHCP = lib.mkDefault true;
networking.useNetworkd = lib.mkDefault true;
};
}

0 comments on commit 8840660

Please sign in to comment.