nixos/httpd: drop the port option
This commit is contained in:
parent
f5945fcf0e
commit
505df09d50
|
@ -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 == []
|
||||
if cfg.listen == []
|
||||
then defaultListen cfg
|
||||
else list;
|
||||
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;
|
||||
|
|
|
@ -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 (
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue