nixos/httpd: drop the port option
This commit is contained in:
parent
f5945fcf0e
commit
505df09d50
|
@ -21,10 +21,9 @@ let
|
||||||
else [{ip = "*"; port = 80;}];
|
else [{ip = "*"; port = 80;}];
|
||||||
|
|
||||||
getListen = cfg:
|
getListen = cfg:
|
||||||
let list = (lib.optional (cfg.port != 0) {ip = "*"; port = cfg.port;}) ++ cfg.listen;
|
if cfg.listen == []
|
||||||
in if list == []
|
then defaultListen cfg
|
||||||
then defaultListen cfg
|
else cfg.listen;
|
||||||
else list;
|
|
||||||
|
|
||||||
listenToString = l: "${l.ip}:${toString l.port}";
|
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."; }
|
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
|
users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
|
||||||
{ name = "wwwrun";
|
{ name = "wwwrun";
|
||||||
group = mainCfg.group;
|
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 {
|
listen = mkOption {
|
||||||
type = types.listOf (types.submodule (
|
type = types.listOf (types.submodule (
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue