summary refs log tree commit diff
path: root/nixos/modules/system/boot/networkd.nix
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-09-13 12:56:05 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-09-13 12:56:05 +0900
commit78858f2f8d8ba3ae792f8be929a7ff3d5783d048 (patch)
treea4ee7bc26acf98d22eff6fbafd2a1b749e7b3746 /nixos/modules/system/boot/networkd.nix
parent69713a882ca0f3e1febf03c8f73b00d06d2cd2ae (diff)
downloadnixlib-78858f2f8d8ba3ae792f8be929a7ff3d5783d048.tar
nixlib-78858f2f8d8ba3ae792f8be929a7ff3d5783d048.tar.gz
nixlib-78858f2f8d8ba3ae792f8be929a7ff3d5783d048.tar.bz2
nixlib-78858f2f8d8ba3ae792f8be929a7ff3d5783d048.tar.lz
nixlib-78858f2f8d8ba3ae792f8be929a7ff3d5783d048.tar.xz
nixlib-78858f2f8d8ba3ae792f8be929a7ff3d5783d048.tar.zst
nixlib-78858f2f8d8ba3ae792f8be929a7ff3d5783d048.zip
networkd module: optionSet -> submodule
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r--nixos/modules/system/boot/networkd.nix21
1 files changed, 8 insertions, 13 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 38b4b437369d..2cf6a4cca9a4 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -471,8 +471,7 @@ let
 
     addresses = mkOption {
       default = [ ];
-      type = types.listOf types.optionSet;
-      options = [ 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>
@@ -482,8 +481,7 @@ let
 
     routes = mkOption {
       default = [ ];
-      type = types.listOf types.optionSet;
-      options = [ 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>
@@ -624,35 +622,32 @@ in
 
     systemd.network.links = mkOption {
       default = {};
-      type = types.attrsOf types.optionSet;
-      options = [ linkOptions ];
+      type = with types; attrsOf (submodule [ linkOptions ]);
       description = "Definition of systemd network links.";
     };
 
     systemd.network.netdevs = mkOption {
       default = {};
-      type = types.attrsOf types.optionSet;
-      options = [ netdevOptions ];
+      type = with types; attrsOf (submodule [ netdevOptions ]);
       description = "Definition of systemd network devices.";
     };
 
     systemd.network.networks = mkOption {
       default = {};
-      type = types.attrsOf types.optionSet;
-      options = [ networkOptions networkConfig ];
+      type = with types; attrsOf (submodule [ networkOptions networkConfig ]);
       description = "Definition of systemd networks.";
     };
 
     systemd.network.units = mkOption {
       description = "Definition of networkd units.";
       default = {};
-      type = types.attrsOf types.optionSet;
-      options = { name, config, ... }:
+      type = with types; attrsOf (submodule (
+        { name, config, ... }:
         { options = concreteUnitOptions;
           config = {
             unit = mkDefault (makeUnit name config);
           };
-        };
+        }));
     };
 
   };