mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
0a6e6cf7e6
this converts meta.doc into an md pointer, not an xml pointer. since we no longer need xml for manual chapters we can also remove support for manual chapters from md-to-db.sh since pandoc converts smart quotes to docbook quote elements and our nixos-render-docs does not we lose this distinction in the rendered output. that's probably not that bad, our stylesheet didn't make use of this anyway (and pre-23.05 versions of the chapters didn't use quote elements either). also updates the nixpkgs manual to clarify that option docs support all extensions (although it doesn't support headings at all, so heading anchors don't work by extension).
61 lines
1.6 KiB
Nix
61 lines
1.6 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.services.blackfire-agent;
|
|
|
|
agentConfigFile = lib.generators.toINI {} {
|
|
blackfire = cfg.settings;
|
|
};
|
|
|
|
agentSock = "blackfire/agent.sock";
|
|
in {
|
|
meta = {
|
|
maintainers = pkgs.blackfire.meta.maintainers;
|
|
doc = ./blackfire.md;
|
|
};
|
|
|
|
options = {
|
|
services.blackfire-agent = {
|
|
enable = lib.mkEnableOption (lib.mdDoc "Blackfire profiler agent");
|
|
settings = lib.mkOption {
|
|
description = lib.mdDoc ''
|
|
See https://blackfire.io/docs/up-and-running/configuration/agent
|
|
'';
|
|
type = lib.types.submodule {
|
|
freeformType = with lib.types; attrsOf str;
|
|
|
|
options = {
|
|
server-id = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = lib.mdDoc ''
|
|
Sets the server id used to authenticate with Blackfire
|
|
|
|
You can find your personal server-id at https://blackfire.io/my/settings/credentials
|
|
'';
|
|
};
|
|
|
|
server-token = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = lib.mdDoc ''
|
|
Sets the server token used to authenticate with Blackfire
|
|
|
|
You can find your personal server-token at https://blackfire.io/my/settings/credentials
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.etc."blackfire/agent".text = agentConfigFile;
|
|
|
|
services.blackfire-agent.settings.socket = "unix:///run/${agentSock}";
|
|
|
|
systemd.packages = [
|
|
pkgs.blackfire
|
|
];
|
|
};
|
|
}
|