nixos/prometheus: throw a helpful error when services.prometheus.environmentFile is defined

Changed files
+6 -2
nixos
doc
manual
from_md
release-notes
release-notes
modules
services
monitoring
prometheus
+3 -1
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
···
<literal>services.prometheus.environmentFile</literal> has
been removed since it was causing
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/126083">issues</link>
-
and Prometheus now has native support for secret files.
+
and Prometheus now has native support for secret files, i.e.
+
<literal>basic_auth.password_file</literal> and
+
<literal>authorization.credentials_file</literal>.
</para>
</listitem>
<listitem>
+1 -1
nixos/doc/manual/release-notes/rl-2111.section.md
···
- A new option `services.prometheus.enableReload` has been added which can be enabled to reload the prometheus service when its config file changes instead of restarting.
-
- The option `services.prometheus.environmentFile` has been removed since it was causing [issues](https://github.com/NixOS/nixpkgs/issues/126083) and Prometheus now has native support for secret files.
+
- The option `services.prometheus.environmentFile` has been removed since it was causing [issues](https://github.com/NixOS/nixpkgs/issues/126083) and Prometheus now has native support for secret files, i.e. `basic_auth.password_file` and `authorization.credentials_file`.
- Dokuwiki now supports caddy! However
- the nginx option has been removed, in the new configuration, please use the `dokuwiki.webserver = "nginx"` instead.
+2
nixos/modules/services/monitoring/prometheus/default.nix
···
imports = [
(mkRenamedOptionModule [ "services" "prometheus2" ] [ "services" "prometheus" ])
+
(mkRemovedOptionModule [ "services" "prometheus" "environmentFile" ]
+
"It has been removed since it was causing issues (https://github.com/NixOS/nixpkgs/issues/126083) and Prometheus now has native support for secret files, i.e. `basic_auth.password_file` and `authorization.credentials_file`.")
];
options.services.prometheus = {