From 6341a1258750fd19647f1a2bcebe7f011f7acae7 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 22 Jul 2013 14:16:13 +0200 Subject: [PATCH] modules/services/networking/dhcpcd.nix: add "extraConfig" option This option allows administrators to add verbatim text to the generated config file. I use this feature, for instance, to disable the default route normally added by dhcpcd for certain interfaces. --- modules/services/networking/dhcpcd.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/services/networking/dhcpcd.nix b/modules/services/networking/dhcpcd.nix index 342253bac29..761ddc08bf1 100644 --- a/modules/services/networking/dhcpcd.nix +++ b/modules/services/networking/dhcpcd.nix @@ -35,6 +35,8 @@ let # Ethernet cards used for bridging. Likewise for vif* and tap* # (Xen) and virbr* and vnet* (libvirt). denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet* + + ${config.networking.dhcpcd.extraConfig} ''; # Hook for emitting ip-up/ip-down events. @@ -85,6 +87,13 @@ in ''; }; + networking.dhcpcd.extraConfig = mkOption { + default = ""; + description = '' + Literal string to append to the config file generated for dhcpcd. + ''; + }; + };