From 078925c954fd2114db5a4ef976e9fb6f423c2653 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 5 Jul 2018 22:10:44 -0400 Subject: quagga module: Use a deep merge via imports instead of the shallow merge The deep merge caused all the options to be unset when generating docs, unless quagga was enabled. Using imports, instead, properly allows the documentation to be generated. --- nixos/modules/services/networking/quagga.nix | 33 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/networking/quagga.nix b/nixos/modules/services/networking/quagga.nix index 22204e53203..5acdd5af8f8 100644 --- a/nixos/modules/services/networking/quagga.nix +++ b/nixos/modules/services/networking/quagga.nix @@ -95,26 +95,25 @@ in { ###### interface - - options.services.quagga = + imports = [ { - - zebra = (serviceOptions "zebra") // { - - enable = mkOption { - type = types.bool; - default = any isEnabled services; - description = '' - Whether to enable the Zebra routing manager. - - The Zebra routing manager is automatically enabled - if any routing protocols are configured. - ''; + options.services.quagga = { + zebra = (serviceOptions "zebra") // { + enable = mkOption { + type = types.bool; + default = any isEnabled services; + description = '' + Whether to enable the Zebra routing manager. + + The Zebra routing manager is automatically enabled + if any routing protocols are configured. + ''; + }; }; - }; - - } // (genAttrs services serviceOptions); + } + { options.services.quagga = (genAttrs services serviceOptions); } + ]; ###### implementation -- cgit 1.4.1