about summary refs log tree commit diff
path: root/nixos/modules/services/networking/xinetd.nix
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-09-11 18:20:30 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-09-13 12:53:11 +0900
commit775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2 (patch)
tree63d98769b2c21899c33ab6e2b2e59737188f9504 /nixos/modules/services/networking/xinetd.nix
parent819524a0d334e511ef38b8f09cfa1a56b9c51b61 (diff)
downloadnixlib-775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2.tar
nixlib-775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2.tar.gz
nixlib-775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2.tar.bz2
nixlib-775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2.tar.lz
nixlib-775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2.tar.xz
nixlib-775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2.tar.zst
nixlib-775d98acbc41bdaf2fa2a3bbed1fefcd79371fd2.zip
xinet module: optionSet -> submodule
Diffstat (limited to 'nixos/modules/services/networking/xinetd.nix')
-rw-r--r--nixos/modules/services/networking/xinetd.nix126
1 files changed, 64 insertions, 62 deletions
diff --git a/nixos/modules/services/networking/xinetd.nix b/nixos/modules/services/networking/xinetd.nix
index 08680b517808..b398f346b942 100644
--- a/nixos/modules/services/networking/xinetd.nix
+++ b/nixos/modules/services/networking/xinetd.nix
@@ -65,71 +65,73 @@ in
         A list of services provided by xinetd.
       '';
 
-      type = types.listOf types.optionSet;
+      type = with types; listOf (submodule ({
+
+        options = {
+
+          name = mkOption {
+            type = types.string;
+            example = "login";
+            description = "Name of the service.";
+          };
+
+          protocol = mkOption {
+            type = types.string;
+            default = "tcp";
+            description =
+              "Protocol of the service.  Usually <literal>tcp</literal> or <literal>udp</literal>.";
+          };
+
+          port = mkOption {
+            type = types.int;
+            default = 0;
+            example = 123;
+            description = "Port number of the service.";
+          };
+
+          user = mkOption {
+            type = types.string;
+            default = "nobody";
+            description = "User account for the service";
+          };
+
+          server = mkOption {
+            type = types.string;
+            example = "/foo/bin/ftpd";
+            description = "Path of the program that implements the service.";
+          };
+
+          serverArgs = mkOption {
+            type = types.string;
+            default = "";
+            description = "Command-line arguments for the server program.";
+          };
+
+          flags = mkOption {
+            type = types.string;
+            default = "";
+            description = "";
+          };
+
+          unlisted = mkOption {
+            type = types.bool;
+            default = false;
+            description = ''
+              Whether this server is listed in
+              <filename>/etc/services</filename>.  If so, the port
+              number can be omitted.
+            '';
+          };
+
+          extraConfig = mkOption {
+            type = types.string;
+            default = "";
+            description = "Extra configuration-lines added to the section of the service.";
+          };
 
-      options = {
-
-        name = mkOption {
-          type = types.string;
-          example = "login";
-          description = "Name of the service.";
-        };
-
-        protocol = mkOption {
-          type = types.string;
-          default = "tcp";
-          description =
-            "Protocol of the service.  Usually <literal>tcp</literal> or <literal>udp</literal>.";
-        };
-
-        port = mkOption {
-          type = types.int;
-          default = 0;
-          example = 123;
-          description = "Port number of the service.";
-        };
-
-        user = mkOption {
-          type = types.string;
-          default = "nobody";
-          description = "User account for the service";
-        };
-
-        server = mkOption {
-          type = types.string;
-          example = "/foo/bin/ftpd";
-          description = "Path of the program that implements the service.";
-        };
-
-        serverArgs = mkOption {
-          type = types.string;
-          default = "";
-          description = "Command-line arguments for the server program.";
-        };
-
-        flags = mkOption {
-          type = types.string;
-          default = "";
-          description = "";
-        };
-
-        unlisted = mkOption {
-          type = types.bool;
-          default = false;
-          description = ''
-            Whether this server is listed in
-            <filename>/etc/services</filename>.  If so, the port
-            number can be omitted.
-          '';
-        };
-
-        extraConfig = mkOption {
-          type = types.string;
-          default = "";
-          description = "Extra configuration-lines added to the section of the service.";
         };
 
-      };
+      }));
 
     };