···18181919 networks = mkOption {
2020 default = { };
2121- type = types.loaOf types.optionSet;
2222- description = ''
2323- Defines the tinc networks which will be started.
2424- Each network invokes a different daemon.
2525- '';
2626- options = {
2121+ type = with types; loaOf (submodule {
2222+ options = {
27232828- extraConfig = mkOption {
2929- default = "";
3030- type = types.lines;
3131- description = ''
3232- Extra lines to add to the tinc service configuration file.
3333- '';
3434- };
2424+ extraConfig = mkOption {
2525+ default = "";
2626+ type = types.lines;
2727+ description = ''
2828+ Extra lines to add to the tinc service configuration file.
2929+ '';
3030+ };
35313636- name = mkOption {
3737- default = null;
3838- type = types.nullOr types.str;
3939- description = ''
4040- The name of the node which is used as an identifier when communicating
4141- with the remote nodes in the mesh. If null then the hostname of the system
4242- is used.
4343- '';
4444- };
3232+ name = mkOption {
3333+ default = null;
3434+ type = types.nullOr types.str;
3535+ description = ''
3636+ The name of the node which is used as an identifier when communicating
3737+ with the remote nodes in the mesh. If null then the hostname of the system
3838+ is used.
3939+ '';
4040+ };
45414646- ed25519PrivateKeyFile = mkOption {
4747- default = null;
4848- type = types.nullOr types.path;
4949- description = ''
5050- Path of the private ed25519 keyfile.
5151- '';
5252- };
4242+ ed25519PrivateKeyFile = mkOption {
4343+ default = null;
4444+ type = types.nullOr types.path;
4545+ description = ''
4646+ Path of the private ed25519 keyfile.
4747+ '';
4848+ };
53495454- debugLevel = mkOption {
5555- default = 0;
5656- type = types.addCheck types.int (l: l >= 0 && l <= 5);
5757- description = ''
5858- The amount of debugging information to add to the log. 0 means little
5959- logging while 5 is the most logging. <command>man tincd</command> for
6060- more details.
6161- '';
6262- };
5050+ debugLevel = mkOption {
5151+ default = 0;
5252+ type = types.addCheck types.int (l: l >= 0 && l <= 5);
5353+ description = ''
5454+ The amount of debugging information to add to the log. 0 means little
5555+ logging while 5 is the most logging. <command>man tincd</command> for
5656+ more details.
5757+ '';
5858+ };
63596464- hosts = mkOption {
6565- default = { };
6666- type = types.loaOf types.lines;
6767- description = ''
6868- The name of the host in the network as well as the configuration for that host.
6969- This name should only contain alphanumerics and underscores.
7070- '';
7171- };
6060+ hosts = mkOption {
6161+ default = { };
6262+ type = types.loaOf types.lines;
6363+ description = ''
6464+ The name of the host in the network as well as the configuration for that host.
6565+ This name should only contain alphanumerics and underscores.
6666+ '';
6767+ };
72687373- interfaceType = mkOption {
7474- default = "tun";
7575- type = types.addCheck types.str (n: n == "tun" || n == "tap");
7676- description = ''
7777- The type of virtual interface used for the network connection
7878- '';
7979- };
6969+ interfaceType = mkOption {
7070+ default = "tun";
7171+ type = types.addCheck types.str (n: n == "tun" || n == "tap");
7272+ description = ''
7373+ The type of virtual interface used for the network connection
7474+ '';
7575+ };
80768181- listenAddress = mkOption {
8282- default = null;
8383- type = types.nullOr types.str;
8484- description = ''
8585- The ip adress to bind to.
8686- '';
8787- };
7777+ listenAddress = mkOption {
7878+ default = null;
7979+ type = types.nullOr types.str;
8080+ description = ''
8181+ The ip adress to bind to.
8282+ '';
8383+ };
88848989- package = mkOption {
9090- type = types.package;
9191- default = pkgs.tinc_pre;
9292- defaultText = "pkgs.tinc_pre";
9393- description = ''
9494- The package to use for the tinc daemon's binary.
9595- '';
9696- };
8585+ package = mkOption {
8686+ type = types.package;
8787+ default = pkgs.tinc_pre;
8888+ defaultText = "pkgs.tinc_pre";
8989+ description = ''
9090+ The package to use for the tinc daemon's binary.
9191+ '';
9292+ };
97939898- chroot = mkOption {
9999- default = true;
100100- type = types.bool;
101101- description = ''
102102- Change process root directory to the directory where the config file is located (/etc/tinc/netname/), for added security.
103103- The chroot is performed after all the initialization is done, after writing pid files and opening network sockets.
9494+ chroot = mkOption {
9595+ default = true;
9696+ type = types.bool;
9797+ description = ''
9898+ Change process root directory to the directory where the config file is located (/etc/tinc/netname/), for added security.
9999+ The chroot is performed after all the initialization is done, after writing pid files and opening network sockets.
104100105105- Note that tinc can't run scripts anymore (such as tinc-down or host-up), unless it is setup to be runnable inside chroot environment.
106106- '';
101101+ Note that tinc can't run scripts anymore (such as tinc-down or host-up), unless it is setup to be runnable inside chroot environment.
102102+ '';
103103+ };
107104 };
108108- };
105105+ });
106106+107107+ description = ''
108108+ Defines the tinc networks which will be started.
109109+ Each network invokes a different daemon.
110110+ '';
109111 };
110112 };
111113