networkd module: optionSet -> submodule

This commit is contained in:
Eric Sagnes 2016-09-13 12:56:05 +09:00
parent 69713a882c
commit 78858f2f8d

View File

@ -471,8 +471,7 @@ let
addresses = mkOption { addresses = mkOption {
default = [ ]; default = [ ];
type = types.listOf types.optionSet; type = with types; listOf (submodule [ addressOptions ]);
options = [ addressOptions ];
description = '' description = ''
A list of address sections to be added to the unit. See A list of address sections to be added to the unit. See
<citerefentry><refentrytitle>systemd.network</refentrytitle> <citerefentry><refentrytitle>systemd.network</refentrytitle>
@ -482,8 +481,7 @@ let
routes = mkOption { routes = mkOption {
default = [ ]; default = [ ];
type = types.listOf types.optionSet; type = with types; listOf (submodule [ routeOptions ]);
options = [ routeOptions ];
description = '' description = ''
A list of route sections to be added to the unit. See A list of route sections to be added to the unit. See
<citerefentry><refentrytitle>systemd.network</refentrytitle> <citerefentry><refentrytitle>systemd.network</refentrytitle>
@ -624,35 +622,32 @@ in
systemd.network.links = mkOption { systemd.network.links = mkOption {
default = {}; default = {};
type = types.attrsOf types.optionSet; type = with types; attrsOf (submodule [ linkOptions ]);
options = [ linkOptions ];
description = "Definition of systemd network links."; description = "Definition of systemd network links.";
}; };
systemd.network.netdevs = mkOption { systemd.network.netdevs = mkOption {
default = {}; default = {};
type = types.attrsOf types.optionSet; type = with types; attrsOf (submodule [ netdevOptions ]);
options = [ netdevOptions ];
description = "Definition of systemd network devices."; description = "Definition of systemd network devices.";
}; };
systemd.network.networks = mkOption { systemd.network.networks = mkOption {
default = {}; default = {};
type = types.attrsOf types.optionSet; type = with types; attrsOf (submodule [ networkOptions networkConfig ]);
options = [ networkOptions networkConfig ];
description = "Definition of systemd networks."; description = "Definition of systemd networks.";
}; };
systemd.network.units = mkOption { systemd.network.units = mkOption {
description = "Definition of networkd units."; description = "Definition of networkd units.";
default = {}; default = {};
type = types.attrsOf types.optionSet; type = with types; attrsOf (submodule (
options = { name, config, ... }: { name, config, ... }:
{ options = concreteUnitOptions; { options = concreteUnitOptions;
config = { config = {
unit = mkDefault (makeUnit name config); unit = mkDefault (makeUnit name config);
}; };
}; }));
}; };
}; };