From 48d6fa933cf751c4f390ff358f88d90aeb945dc9 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Sun, 11 Sep 2016 18:08:31 +0900 Subject: sshd module: optionSet -> submodule --- nixos/modules/services/networking/ssh/sshd.nix | 35 +++++++++++++------------- 1 file 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 { -- cgit 1.4.1