summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-10-03 13:02:42 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-10-03 13:02:42 +0900
commit24aacc3b4354a84c61c2af472fcb196da694bb72 (patch)
tree69a62dc3561ebdd1e1ff7a87e7473e919d89c542 /nixos/modules
parent1b255790b42e01791227d3b40b26bf690c09df6f (diff)
downloadnixlib-24aacc3b4354a84c61c2af472fcb196da694bb72.tar
nixlib-24aacc3b4354a84c61c2af472fcb196da694bb72.tar.gz
nixlib-24aacc3b4354a84c61c2af472fcb196da694bb72.tar.bz2
nixlib-24aacc3b4354a84c61c2af472fcb196da694bb72.tar.lz
nixlib-24aacc3b4354a84c61c2af472fcb196da694bb72.tar.xz
nixlib-24aacc3b4354a84c61c2af472fcb196da694bb72.tar.zst
nixlib-24aacc3b4354a84c61c2af472fcb196da694bb72.zip
networkd module: fix submodule options declaration
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/system/boot/networkd.nix58
1 files changed, 29 insertions, 29 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index dbb9bced94cf..8c139a94c0c8 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -296,35 +296,35 @@ let
   };
 
   addressOptions = {
-
-    addressConfig = mkOption {
-      default = {};
-      example = { Address = "192.168.0.100/24"; };
-      type = types.addCheck (types.attrsOf unitOption) checkAddress;
-      description = ''
-        Each attribute in this set specifies an option in the
-        <literal>[Address]</literal> section of the unit.  See
-        <citerefentry><refentrytitle>systemd.network</refentrytitle>
-        <manvolnum>5</manvolnum></citerefentry> for details.
-      '';
+    options = {
+      addressConfig = mkOption {
+        default = {};
+        example = { Address = "192.168.0.100/24"; };
+        type = types.addCheck (types.attrsOf unitOption) checkAddress;
+        description = ''
+          Each attribute in this set specifies an option in the
+          <literal>[Address]</literal> section of the unit.  See
+          <citerefentry><refentrytitle>systemd.network</refentrytitle>
+          <manvolnum>5</manvolnum></citerefentry> for details.
+        '';
+      };
     };
-
   };
 
   routeOptions = {
-
-    routeConfig = mkOption {
-      default = {};
-      example = { Gateway = "192.168.0.1"; };
-      type = types.addCheck (types.attrsOf unitOption) checkRoute;
-      description = ''
-        Each attribute in this set specifies an option in the
-        <literal>[Route]</literal> section of the unit.  See
-        <citerefentry><refentrytitle>systemd.network</refentrytitle>
-        <manvolnum>5</manvolnum></citerefentry> for details.
-      '';
+    options = {
+      routeConfig = mkOption {
+        default = {};
+        example = { Gateway = "192.168.0.1"; };
+        type = types.addCheck (types.attrsOf unitOption) checkRoute;
+        description = ''
+          Each attribute in this set specifies an option in the
+          <literal>[Route]</literal> section of the unit.  See
+          <citerefentry><refentrytitle>systemd.network</refentrytitle>
+          <manvolnum>5</manvolnum></citerefentry> for details.
+        '';
+      };
     };
-
   };
 
   networkOptions = commonNetworkOptions // {
@@ -471,7 +471,7 @@ let
 
     addresses = mkOption {
       default = [ ];
-      type = with types; listOf (submodule [ addressOptions ]);
+      type = with types; listOf (submodule addressOptions);
       description = ''
         A list of address sections to be added to the unit.  See
         <citerefentry><refentrytitle>systemd.network</refentrytitle>
@@ -481,7 +481,7 @@ let
 
     routes = mkOption {
       default = [ ];
-      type = with types; listOf (submodule [ routeOptions ]);
+      type = with types; listOf (submodule routeOptions);
       description = ''
         A list of route sections to be added to the unit.  See
         <citerefentry><refentrytitle>systemd.network</refentrytitle>
@@ -622,19 +622,19 @@ in
 
     systemd.network.links = mkOption {
       default = {};
-      type = with types; attrsOf (submodule [ linkOptions ]);
+      type = with types; attrsOf (submodule [ { options = linkOptions; } ]);
       description = "Definition of systemd network links.";
     };
 
     systemd.network.netdevs = mkOption {
       default = {};
-      type = with types; attrsOf (submodule [ netdevOptions ]);
+      type = with types; attrsOf (submodule [ { options = netdevOptions; } ]);
       description = "Definition of systemd network devices.";
     };
 
     systemd.network.networks = mkOption {
       default = {};
-      type = with types; attrsOf (submodule [ networkOptions networkConfig ]);
+      type = with types; attrsOf (submodule [ { options = networkOptions; } networkConfig ]);
       description = "Definition of systemd networks.";
     };