git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit078925c954fd2114db5a4ef976e9fb6f423c2653 authorGraham Christensen <graham@grahamc.com> dateThu 5 Jul 2018, 22:10 (8 years ago) parent62f47c5
1 file changed+16−17
nixos/modules/services/networking/quagga.nix+16−17
nixos/modules/services/networking/quagga.nix+16−17
@@ -95,26 +95,25 @@ in
9595{
9696
9797 ###### interface
98−
99− options.services.quagga =
98+ imports = [
10099 {
101−
102− zebra = (serviceOptions "zebra") // {
103−
104− enable = mkOption {
105− type = types.bool;
106− default = any isEnabled services;
107− description = ''
108− Whether to enable the Zebra routing manager.
109−
110− The Zebra routing manager is automatically enabled
111− if any routing protocols are configured.
112− '';
100+ options.services.quagga = {
101+ zebra = (serviceOptions "zebra") // {
102+ enable = mkOption {
103+ type = types.bool;
104+ default = any isEnabled services;
105+ description = ''
106+ Whether to enable the Zebra routing manager.
107+
108+ The Zebra routing manager is automatically enabled
109+ if any routing protocols are configured.
110+ '';
111+ };
113112 };
114−
115113 };
116−
117− } // (genAttrs services serviceOptions);
114+ }
115+ { options.services.quagga = (genAttrs services serviceOptions); }
116+ ];
118117
119118 ###### implementation
120119