nixos/httpd: drop the port option

This commit is contained in:
Aaron Andersen 2019-07-01 15:55:35 -04:00
parent f5945fcf0e
commit 505df09d50
2 changed files with 3 additions and 14 deletions

View File

@ -21,10 +21,9 @@ let
else [{ip = "*"; port = 80;}];
getListen = cfg:
let list = (lib.optional (cfg.port != 0) {ip = "*"; port = cfg.port;}) ++ cfg.listen;
in if list == []
then defaultListen cfg
else list;
if cfg.listen == []
then defaultListen cfg
else cfg.listen;
listenToString = l: "${l.ip}:${toString l.port}";
@ -638,8 +637,6 @@ in
message = "SSL is enabled for httpd, but sslServerCert and/or sslServerKey haven't been specified."; }
];
warnings = map (cfg: ''apache-httpd's port option is deprecated. Use listen = [{/*ip = "*"; */ port = ${toString cfg.port};}]; instead'' ) (lib.filter (cfg: cfg.port != 0) allHosts);
users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
{ name = "wwwrun";
group = mainCfg.group;

View File

@ -24,14 +24,6 @@ with lib;
'';
};
port = mkOption {
type = types.int;
default = 0;
description = ''
Port for the server. Option will be removed, use <option>listen</option> instead.
'';
};
listen = mkOption {
type = types.listOf (types.submodule (
{