git.iko.soy/typeable/nixpkgs
on master help sign in
networkd module: optionSet -> submodule
commit78858f2f8d8ba3ae792f8be929a7ff3d5783d048 authorEric Sagnes <eric.sagnes@gmail.com> dateTue 13 Sep 2016, 12:56 (10 years ago) parent69713a8
1 file changed+8−13
nixos/modules/system/boot/networkd.nix+8−13
nixos/modules/system/boot/networkd.nix+8−13
@@ -471,8 +471,7 @@ let
471471
472472 addresses = mkOption {
473473 default = [ ];
474− type = types.listOf types.optionSet;
475− options = [ addressOptions ];
474+ type = with types; listOf (submodule [ addressOptions ]);
476475 description = ''
477476 A list of address sections to be added to the unit. See
478477 <citerefentry><refentrytitle>systemd.network</refentrytitle>
@@ -482,8 +481,7 @@ let
482481
483482 routes = mkOption {
484483 default = [ ];
485− type = types.listOf types.optionSet;
486− options = [ routeOptions ];
484+ type = with types; listOf (submodule [ routeOptions ]);
487485 description = ''
488486 A list of route sections to be added to the unit. See
489487 <citerefentry><refentrytitle>systemd.network</refentrytitle>
@@ -624,35 +622,32 @@ in
624622
625623 systemd.network.links = mkOption {
626624 default = {};
627− type = types.attrsOf types.optionSet;
628− options = [ linkOptions ];
625+ type = with types; attrsOf (submodule [ linkOptions ]);
629626 description = "Definition of systemd network links.";
630627 };
631628
632629 systemd.network.netdevs = mkOption {
633630 default = {};
634− type = types.attrsOf types.optionSet;
635− options = [ netdevOptions ];
631+ type = with types; attrsOf (submodule [ netdevOptions ]);
636632 description = "Definition of systemd network devices.";
637633 };
638634
639635 systemd.network.networks = mkOption {
640636 default = {};
641− type = types.attrsOf types.optionSet;
642− options = [ networkOptions networkConfig ];
637+ type = with types; attrsOf (submodule [ networkOptions networkConfig ]);
643638 description = "Definition of systemd networks.";
644639 };
645640
646641 systemd.network.units = mkOption {
647642 description = "Definition of networkd units.";
648643 default = {};
649− type = types.attrsOf types.optionSet;
650− options = { name, config, ... }:
644+ type = with types; attrsOf (submodule (
645+ { name, config, ... }:
651646 { options = concreteUnitOptions;
652647 config = {
653648 unit = mkDefault (makeUnit name config);
654649 };
655− };
650+ }));
656651 };
657652
658653 };