networkd module: fix submodule options declaration
This commit is contained in:
parent
1b255790b4
commit
24aacc3b43
|
@ -296,35 +296,35 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
addressOptions = {
|
addressOptions = {
|
||||||
|
options = {
|
||||||
addressConfig = mkOption {
|
addressConfig = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = { Address = "192.168.0.100/24"; };
|
example = { Address = "192.168.0.100/24"; };
|
||||||
type = types.addCheck (types.attrsOf unitOption) checkAddress;
|
type = types.addCheck (types.attrsOf unitOption) checkAddress;
|
||||||
description = ''
|
description = ''
|
||||||
Each attribute in this set specifies an option in the
|
Each attribute in this set specifies an option in the
|
||||||
<literal>[Address]</literal> section of the unit. See
|
<literal>[Address]</literal> section of the unit. See
|
||||||
<citerefentry><refentrytitle>systemd.network</refentrytitle>
|
<citerefentry><refentrytitle>systemd.network</refentrytitle>
|
||||||
<manvolnum>5</manvolnum></citerefentry> for details.
|
<manvolnum>5</manvolnum></citerefentry> for details.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
routeOptions = {
|
routeOptions = {
|
||||||
|
options = {
|
||||||
routeConfig = mkOption {
|
routeConfig = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = { Gateway = "192.168.0.1"; };
|
example = { Gateway = "192.168.0.1"; };
|
||||||
type = types.addCheck (types.attrsOf unitOption) checkRoute;
|
type = types.addCheck (types.attrsOf unitOption) checkRoute;
|
||||||
description = ''
|
description = ''
|
||||||
Each attribute in this set specifies an option in the
|
Each attribute in this set specifies an option in the
|
||||||
<literal>[Route]</literal> section of the unit. See
|
<literal>[Route]</literal> section of the unit. See
|
||||||
<citerefentry><refentrytitle>systemd.network</refentrytitle>
|
<citerefentry><refentrytitle>systemd.network</refentrytitle>
|
||||||
<manvolnum>5</manvolnum></citerefentry> for details.
|
<manvolnum>5</manvolnum></citerefentry> for details.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networkOptions = commonNetworkOptions // {
|
networkOptions = commonNetworkOptions // {
|
||||||
|
@ -471,7 +471,7 @@ let
|
||||||
|
|
||||||
addresses = mkOption {
|
addresses = mkOption {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
type = with types; listOf (submodule [ addressOptions ]);
|
type = with types; listOf (submodule 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>
|
||||||
|
@ -481,7 +481,7 @@ let
|
||||||
|
|
||||||
routes = mkOption {
|
routes = mkOption {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
type = with types; listOf (submodule [ routeOptions ]);
|
type = with types; listOf (submodule 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>
|
||||||
|
@ -622,19 +622,19 @@ in
|
||||||
|
|
||||||
systemd.network.links = mkOption {
|
systemd.network.links = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
type = with types; attrsOf (submodule [ linkOptions ]);
|
type = with types; attrsOf (submodule [ { 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 = with types; attrsOf (submodule [ netdevOptions ]);
|
type = with types; attrsOf (submodule [ { 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 = with types; attrsOf (submodule [ networkOptions networkConfig ]);
|
type = with types; attrsOf (submodule [ { options = networkOptions; } networkConfig ]);
|
||||||
description = "Definition of systemd networks.";
|
description = "Definition of systemd networks.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue