diff --git a/modules/nixos/networking/default.nix b/modules/nixos/networking/default.nix index 0af40f8..e80408b 100644 --- a/modules/nixos/networking/default.nix +++ b/modules/nixos/networking/default.nix @@ -4,7 +4,11 @@ ./broadcom.nix ./intel.nix ]; - config = lib.mkIf (builtins.length (config.facter.report.network_interface or [ ]) > 0) { + + 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; };