Skip to content

Commit

Permalink
add facter.dhcp.enable option
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 4, 2024
1 parent b4beb32 commit 84e8b2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/nixos/networking/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 84e8b2a

Please sign in to comment.