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.
This commit is contained in:
Peter Simons 2013-07-22 14:16:13 +02:00
parent c52fd85990
commit 6341a12587

View File

@ -35,6 +35,8 @@ let
# Ethernet cards used for bridging. Likewise for vif* and tap* # Ethernet cards used for bridging. Likewise for vif* and tap*
# (Xen) and virbr* and vnet* (libvirt). # (Xen) and virbr* and vnet* (libvirt).
denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet* denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet*
${config.networking.dhcpcd.extraConfig}
''; '';
# Hook for emitting ip-up/ip-down events. # 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.
'';
};
}; };