summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-09-11 18:08:31 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-09-13 12:53:11 +0900
commit48d6fa933cf751c4f390ff358f88d90aeb945dc9 (patch)
treeb68268cfc4eafb2c3532556410d172fbf0f61d72
parentd89a718bafb0110a5ee455e0e84d05e4a95795ab (diff)
downloadnixlib-48d6fa933cf751c4f390ff358f88d90aeb945dc9.tar
nixlib-48d6fa933cf751c4f390ff358f88d90aeb945dc9.tar.gz
nixlib-48d6fa933cf751c4f390ff358f88d90aeb945dc9.tar.bz2
nixlib-48d6fa933cf751c4f390ff358f88d90aeb945dc9.tar.lz
nixlib-48d6fa933cf751c4f390ff358f88d90aeb945dc9.tar.xz
nixlib-48d6fa933cf751c4f390ff358f88d90aeb945dc9.tar.zst
nixlib-48d6fa933cf751c4f390ff358f88d90aeb945dc9.zip
sshd module: optionSet -> submodule
-rw-r--r--nixos/modules/services/networking/ssh/sshd.nix35
1 files changed, 18 insertions, 17 deletions
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
index 1d15a1419722..46ccf4ae62d5 100644
--- a/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -129,7 +129,24 @@ in
       };
 
       listenAddresses = mkOption {
-        type = types.listOf types.optionSet;
+        type = with types; listOf (submodule {
+          options = {
+            addr = mkOption {
+              type = types.nullOr types.str;
+              default = null;
+              description = ''
+                Host, IPv4 or IPv6 address to listen to.
+              '';
+            };
+            port = mkOption {
+              type = types.nullOr types.int;
+              default = null;
+              description = ''
+                Port to listen to.
+              '';
+            };
+          };
+        });
         default = [];
         example = [ { addr = "192.168.3.1"; port = 22; } { addr = "0.0.0.0"; port = 64022; } ];
         description = ''
@@ -140,22 +157,6 @@ in
           NOTE: setting this option won't automatically enable given ports
           in firewall configuration.
         '';
-        options = {
-          addr = mkOption {
-            type = types.nullOr types.str;
-            default = null;
-            description = ''
-              Host, IPv4 or IPv6 address to listen to.
-            '';
-          };
-          port = mkOption {
-            type = types.nullOr types.int;
-            default = null;
-            description = ''
-              Port to listen to.
-            '';
-          };
-        };
       };
 
       passwordAuthentication = mkOption {