git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #64151 from aanderse/httpd-extraSubservices
72ef478Aaron Andersen
nixos/doc/manual/release-notes/rl-1909.xml+14−3
@@ -149,9 +149,20 @@
149 </listitem>
149 </listitem>
150 <listitem>
150 <listitem>
151 <para>
151 <para>
152+ The httpd service no longer attempts to start the postgresql service. If you have come to depend
153+ on this behaviour then you can preserve the behavior with the following configuration:
154+ <literal>systemd.services.httpd.after = [ "postgresql.service" ];</literal>
155+ </para>
156+ <para>
157+ The option <option>services.httpd.extraSubservices</option> has been
158+ marked as deprecated. You may still use this feature, but it will be
159+ removed in a future release of NixOS. You are encouraged to convert any
160+ httpd subservices you may have written to a full NixOS module.
161+ </para>
162+ <para>
152− Several of the apache subservices have been replaced with full NixOS
163+ Most of the httpd subservices packaged with NixOS have been replaced with
153− modules including LimeSurvey, WordPress, and Zabbix.
164+ full NixOS modules including LimeSurvey, WordPress, and Zabbix. These
154− These modules can be enabled using the <option>services.limesurvey.enable</option>,
165+ modules can be enabled using the <option>services.limesurvey.enable</option>,
155 <option>services.wordpress.enable</option>, and <option>services.zabbixWeb.enable</option> options.
166 <option>services.wordpress.enable</option>, and <option>services.zabbixWeb.enable</option> options.
156 </para>
167 </para>
157 </listitem>
168 </listitem>
nixos/modules/services/web-servers/apache-httpd/default.nix+5−6
@@ -21,10 +21,9 @@ let
21 else [{ip = "*"; port = 80;}];
21 else [{ip = "*"; port = 80;}];
22
22
23 getListen = cfg:
23 getListen = cfg:
24− let list = (lib.optional (cfg.port != 0) {ip = "*"; port = cfg.port;}) ++ cfg.listen;
24+ if cfg.listen == []
25− in if list == []
26− then defaultListen cfg
25+ then defaultListen cfg
27− else list;
26+ else cfg.listen;
28
27
29 listenToString = l: "${l.ip}:${toString l.port}";
28 listenToString = l: "${l.ip}:${toString l.port}";
30
29
@@ -638,7 +637,7 @@ in
638 message = "SSL is enabled for httpd, but sslServerCert and/or sslServerKey haven't been specified."; }
637 message = "SSL is enabled for httpd, but sslServerCert and/or sslServerKey haven't been specified."; }
639 ];
638 ];
640
639
641− 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);
640+ 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);
642
641
643 users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
642 users.users = optionalAttrs (mainCfg.user == "wwwrun") (singleton
644 { name = "wwwrun";
643 { name = "wwwrun";
@@ -672,7 +671,7 @@ in
672
671
673 wantedBy = [ "multi-user.target" ];
672 wantedBy = [ "multi-user.target" ];
674 wants = [ "keys.target" ];
673 wants = [ "keys.target" ];
675− after = [ "network.target" "fs.target" "postgresql.service" "keys.target" ];
674+ after = [ "network.target" "fs.target" "keys.target" ];
676
675
677 path =
676 path =
678 [ httpd pkgs.coreutils pkgs.gnugrep ]
677 [ httpd pkgs.coreutils pkgs.gnugrep ]
nixos/modules/services/web-servers/apache-httpd/per-server-options.nix−8
@@ -24,14 +24,6 @@ with lib;
24 '';
24 '';
25 };
25 };
26
26
27− port = mkOption {
28− type = types.int;
29− default = 0;
30− description = ''
31− Port for the server. Option will be removed, use <option>listen</option> instead.
32− '';
33− };
34−
35 listen = mkOption {
27 listen = mkOption {
36 type = types.listOf (types.submodule (
28 type = types.listOf (types.submodule (
37 {
29 {