Commit Graph

17 Commits

Author SHA1 Message Date
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
h7x4
79d3d59f58
treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
K900
86c366b440
nixos/grafana-agent: remove deprecated option (#232375)
Deprecated in version 0.21: 323c1eb36d/docs/sources/static/upgrade-guide.md (L417)
2023-05-17 11:21:27 +02:00
Emily Lange
549bee9851
nixos/grafana-agent: add extraFlags option (#228883) 2023-05-05 15:14:41 +02:00
IndeedNotJames
845a6e9784
nixos/grafana-agent: use lib.getExe as binary names changed between updates
and `lib.getExe` allows a safe handling and potential backport of this.
But for that to work it would require 22.11 to set `pkgs.grafana-agent.meta.mainProgram = "agent"`

Relevant upstream release: https://github.com/grafana/agent/releases/tag/v0.31.0
2023-04-13 10:43:02 +02:00
Naïm Favier
0ff3b35356 nixos/doc: fix some options 2022-12-08 17:52:52 +01:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae
8f8e101527 nixos/*: normalize <package> to <literal>
this renders the same in the manpage and a little more clearly in the
html manual. in the manpage there continues to be no distinction from
regular text, the html manual gets code-type markup (which was probably
the intention for most of these uses anyway).
2022-08-19 22:40:58 +02:00
pennae
6b13dd0e9e
Merge pull request #183491 from pennae/automatic-md-conversions
treewide: automatically md-convert option descriptions
2022-08-02 02:15:30 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Florian Klink
7df5b81fc3 nixos/grafana-agent: ensure defaults are merged
Move the defaults to the `config` section of the module, and apply them
with mkDefault.

That way the defaults are merged with user-provided config, and are
merged without having to use lib.mkForce.
2022-07-29 13:23:12 +07:00
Florian Klink
5f297c164e nixos/grafana-agent: add myself as maintainer 2022-06-19 11:50:32 +02:00
Florian Klink
b09836593e nixos/grafana-agent: move remote write config from integrations.prometheus_remote_write to metrics.global.remote_write
remote_write config in integrations.prometheus_remote_write is only
applied for integrations, so static configurations won't get written
anywhere.
2022-06-19 11:50:32 +02:00
Florian Klink
e578b4d3ed nixos/grafana-agent: drop server.{grpc,http}_listen_address,http_listen_port
According to https://grafana.com/docs/agent/latest/upgrade-guide/#v0240,
this has been deprecated/moved to -server.http.address and
-server.grpc.address (accepting ip and port) config options in v0.24.0,
and already listens on localhost and not port 80 by default.
2022-06-19 11:50:31 +02:00
Florian Klink
2cca676e69 nixos/grafana-agent: replace settings.prometheus with settings.metrics
According to https://github.com/grafana/agent/pull/1540, -prometheus.*
flages were deprecated in 0.19.0 in favor of the -metrics.*
counterparts. Same applies to `loki` being renamed to `logs`.

I'm not sure if the config file format is still supported (it could be),
but we shouldn't use deprecated configs.
2022-06-19 11:50:31 +02:00
zimbatm
31b47913f3
nixos: add grafana-agent module
Easily ship logs and metrics to Grafana Cloud and other similar targets.
2022-06-15 12:59:06 +02:00