From 579051fe66f3c41615309c17f96153e6dac0e10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 17 Dec 2016 12:03:40 +0100 Subject: [PATCH] networkd: add extraConfig to all units networkd options are always correct or up to date. This option allows to by pass type checking. It is also easier to write because examples can be just copy and paste from manpages. --- nixos/modules/system/boot/networkd.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 86237ea6ac7..b828ad53dc5 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -165,6 +165,11 @@ let ''; }; + extraConfig = mkOption { + default = ""; + type = types.lines; + description = "Extra configuration append to unit"; + }; }; linkOptions = commonNetworkOptions // { @@ -515,6 +520,8 @@ let '' [Link] ${attrsToSection def.linkConfig} + + ${def.extraConfig} ''; }; @@ -565,6 +572,7 @@ let ${attrsToSection def.bondConfig} ''} + ${def.extraConfig} ''; }; @@ -603,6 +611,7 @@ let ${attrsToSection x.routeConfig} '')} + ${def.extraConfig} ''; };