Merge pull request #64151 from aanderse/httpd-extraSubservices
nixos/httpd: module cleanup
This commit is contained in:
commit
72ef4786e1
@ -149,9 +149,20 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Several of the apache subservices have been replaced with full NixOS
|
The httpd service no longer attempts to start the postgresql service. If you have come to depend
|
||||||
modules including LimeSurvey, WordPress, and Zabbix.
|
on this behaviour then you can preserve the behavior with the following configuration:
|
||||||
These modules can be enabled using the <option>services.limesurvey.enable</option>,
|
<literal>systemd.services.httpd.after = [ "postgresql.service" ];</literal>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The option <option>services.httpd.extraSubservices</option> has been
|
||||||
|
marked as deprecated. You may still use this feature, but it will be
|
||||||
|
removed in a future release of NixOS. You are encouraged to convert any
|
||||||
|
httpd subservices you may have written to a full NixOS module.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Most of the httpd subservices packaged with NixOS have been replaced with
|
||||||
|
full NixOS modules including LimeSurvey, WordPress, and Zabbix. These
|
||||||
|
modules can be enabled using the <option>services.limesurvey.enable</option>,
|
||||||
<option>services.wordpress.enable</option>, and <option>services.zabbixWeb.enable</option> options.
|
<option>services.wordpress.enable</option>, and <option>services.zabbixWeb.enable</option> options.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -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,7 +637,7 @@ 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);
|
warnings = map (cfg: "apache-httpd's extraSubservices option is deprecated. Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.") (lib.filter (cfg: cfg.extraSubservices != []) allHosts);
|
||||||
|
|
||||||
users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
|
users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
|
||||||
{ name = "wwwrun";
|
{ name = "wwwrun";
|
||||||
@ -672,7 +671,7 @@ in
|
|||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "keys.target" ];
|
wants = [ "keys.target" ];
|
||||||
after = [ "network.target" "fs.target" "postgresql.service" "keys.target" ];
|
after = [ "network.target" "fs.target" "keys.target" ];
|
||||||
|
|
||||||
path =
|
path =
|
||||||
[ httpd pkgs.coreutils pkgs.gnugrep ]
|
[ httpd pkgs.coreutils pkgs.gnugrep ]
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user