jiebi/CodeConvo huggingface dataset:
''; executable = writeScript "pantheon" '' <del> export XDG_CONFIG_DIRS=${elementary-settings-daemon}/etc/xdg:${elementary-default-settings}/etc:$XDG_CONFIG_DIRS </del> <ins> # gnome-session can find RequiredComponents for `pantheon` session (notably pantheon's patched g-s-d autostarts) export XDG_CONFIG_DIRS=@out@/etc/xdg:$XDG_CONFIG_DIRS # Make sure we use our gtk-3.0/settings.ini export XDG_CONFIG_DIRS=${elementary-default-settings}/etc:$XDG_CONFIG_DIRS # * gnome-session can find the `pantheon' session # * use pantheon-mimeapps.list </ins> export XDG_DATA_DIRS=@out@/share:$XDG_DATA_DIRS <del> exec ${gnome-session}/bin/gnome-session --session=pantheon "$@" </del> <ins> # Start pantheon session. Keep in sync with upstream exec ${gnome-session}/bin/gnome-session --builtin --session=pantheon "$@" ''; # Absolute path patched version of the upstream xsession xsession = writeText "pantheon.desktop" '' [Desktop Entry] Name=Pantheon Comment=This session provides elementary experience Exec=@out@/libexec/pantheon TryExec=${wingpanel}/bin/wingpanel Icon= DesktopNames=Pantheon Type=Application </ins> ''; in stdenv.mkDerivation rec { pname = "elementary-session-settings-unstable"; <del> version = "2020-06-11"; </del> <ins> version = "2020-07-06"; </ins> repoName = "session-settings"; src = fetchFromGitHub { owner = "elementary"; repo = repoName; <del> rev = "130c9ae221913032ed18bcf6d21e3dcdba3c4209"; sha256 = "0bzg9vbq0ssnxgcb2vxpx6x9zv8ngkm9r3ki5q83m9al9919n0pr"; </del> <ins> rev = "fa15cbd83fba0ba30e9a302db880350bff5ace52"; hash = "sha256-26H791c7OAjFYtjVChIatICSocMt0uTej1TKBOvw+6w="; </ins> }; nativeBuildInputs = [
]; postInstall = '' <ins> # our mimeapps patched from upstream to exclude: # * pantheon-mail -> geary # * evince.desktop -> org.gnome.Evince.desktop </ins> mkdir -p $out/share/applications cp -av ${./pantheon-mimeapps.list} $out/share/applications/pantheon-mimeapps.list <ins> # instantiates pantheon's dockitems </ins> cp "${dockitemAutostart}" $out/etc/xdg/autostart/default-elementary-dockitems.desktop <ins> # script `Exec` to start pantheon </ins> mkdir -p $out/libexec substitute ${executable} $out/libexec/pantheon --subst-var out chmod +x $out/libexec/pantheon <del> ''; postFixup = '' substituteInPlace $out/share/xsessions/pantheon.desktop  --replace "gnome-session --session=pantheon" "$out/libexec/pantheon"  --replace "wingpanel" "${wingpanel}/bin/wingpanel" </del> <ins> # absolute path patched xsession substitute ${xsession} $out/share/xsessions/pantheon.desktop --subst-var out </ins> ''; passthru = {
libhandy libsoup libunity <del> switchboard </del> <ins> switchboard-with-plugs </ins> wingpanel zeitgeist <del> ]; </del> <ins> ] ++ # applications-menu has a plugin to search switchboard plugins # see https://github.com/NixOS/nixpkgs/issues/100209 # wingpanel's wrapper will need to pick up the fact that # applications-menu needs a version of switchboard with all # its plugins for search. switchboard-with-plugs.buildInputs; </ins> mesonFlags = [ "--sysconfdir=${placeholder "out"}/etc"
''; postFixup = '' <del> for autostart in $(grep -rl "OnlyShowIn=GNOME;" $out/etc/xdg/autostart) do echo "Patching OnlyShowIn to Pantheon in: $autostart" sed -i "s,OnlyShowIn=GNOME;,OnlyShowIn=Pantheon;," $autostart done # This breaks lightlocker https://github.com/elementary/session-settings/commit/b0e7a2867608c3a3916f9e4e21a68264a20e44f8 # TODO: shouldn't be neeed for the 5.1 greeter (awaiting release) rm $out/etc/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop </del> # So the polkit policy can reference /run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper mkdir -p $out/bin/elementary-settings-daemon ln -s $out/libexec/gsd-backlight-helper $out/bin/elementary-settings-daemon/gsd-backlight-helper
echo -java-home ${jre.home} >>conf/sbtopts ''; <del> nativeBuildInputs = [ autoPatchelfHook ]; </del> <ins> nativeBuildInputs = stdenv.lib.optionals stdenv.isLinux [ autoPatchelfHook ]; </ins> <del> buildInputs = [ zlib ]; </del> <ins> buildInputs = stdenv.lib.optionals stdenv.isLinux [ zlib ]; </ins> installPhase = '' mkdir -p $out/share/sbt $out/bin
export TZ="$new_TZ" fi fi <ins> # udev event notifications don't work reliably inside containers. # SDL2 already tries to automatically detect flatpak and pressure-vessel # and falls back to inotify-based discovery [1]. We make SDL2 do the # same by telling it explicitly. # # [1] <https://github.com/libsdl-org/SDL/commit/8e2746cfb6e1f1a1da5088241a1440fd2535e321> export SDL_JOYSTICK_DISABLE_UDEV=1 </ins> '' + extraProfile; runScript = writeScript "steam-wrapper.sh" ''
MODVERSIONS        = whenOlder "4.9" yes; MOUSE_ELAN_I2C_SMBUS = yes; MOUSE_PS2_ELANTECH = yes; # Elantech PS/2 protocol extension <ins> MOUSE_PS2_VMMOUSE  = yes; </ins> MTRR_SANITIZER     = yes; NET_FC             = yes; # Fibre Channel driver support # GPIO on Intel Bay Trail, for some Chromebook internal eMMC disks
, libXcursor, libXext, libXfixes, libXrender, libXScrnSaver, libXcomposite, libxcb , alsa-lib, libXdamage, libXtst, libXrandr, libxshmfence, expat, cups , dbus, gtk3, gdk-pixbuf, gcc-unwrapped, at-spi2-atk, at-spi2-core <del> , libkrb5, libdrm, mesa </del> <ins> , libkrb5, libdrm, libglvnd, mesa </ins> , libxkbcommon, pipewire, wayland # ozone/wayland # Command line programs
liberation_ttf curl util-linux xdg-utils wget flac harfbuzz icu libpng opusWithCustomModes snappy speechd bzip2 libcap at-spi2-atk at-spi2-core <del> libkrb5 libdrm mesa coreutils </del> <ins> libkrb5 libdrm libglvnd mesa coreutils </ins> libxkbcommon pipewire wayland ] ++ optional pulseSupport libpulseaudio ++ optional libvaSupport libva
cp -a opt/* $out/share cp -a usr/share/* $out/share <del> # To fix --use-gl=egl: test -e $out/share/google/$appname/libEGL.so ln -s libEGL.so $out/share/google/$appname/libEGL.so.1 test -e $out/share/google/$appname/libGLESv2.so ln -s libGLESv2.so $out/share/google/$appname/libGLESv2.so.2 </del> substituteInPlace $out/share/applications/google-$appname.desktop  --replace /usr/bin/google-chrome-$dist $exe substituteInPlace $out/share/gnome-control-center/default-apps/google-$appname.xml
stdenv.mkDerivation rec { pname = "thunderbird"; <del> version = "78.4.0"; </del> <ins> version = "78.4.1"; </ins> src = fetchurl { url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz"; sha512 = <del> "04b6n3gsan0a5abh371ws3c3rry4dcb3c6rbqmcxkzrdjg2xr5vn6xhlg3dgl3l01p0hp1xqpckj8g5yb2dq2x07xgg1hnyhs9aadh5"; </del> <ins> "2mbb139xdi69bnvvg7zabwbw181xnz7y154viynmkwyh4iww0hcsvr88q246gnif8a7jns3pi4qgqxgzflyl6mzpsvfdrbjs5hylanx"; </ins> }; nativeBuildInputs = [
thunderbird = thunderbird-78; thunderbird-78 = callPackage ../applications/networking/mailreaders/thunderbird { <del> inherit (rustPackages) cargo rustc; </del> <ins> # Using older Rust for workaround: # https://bugzilla.mozilla.org/show_bug.cgi?id=1663715 inherit (rustPackages_1_45) cargo rustc; </ins> libpng = libpng_apng; icu = icu67; libvpx = libvpx_1_8;
<ins> { stdenv, fetchFromGitHub, audiofile, libtiff, autoreconfHook }: stdenv.mkDerivation rec { version = "3.0.0"; pname = "spandsp"; src = fetchFromGitHub { owner = "freeswitch"; repo = pname; rev = "6ec23e5a7e411a22d59e5678d12c4d2942c4a4b6"; # upstream does not seem to believe in tags sha256 = "03w0s99y3zibi5fnvn8lk92dggfgrr0mz5255745jfbz28b2d5y7"; }; outputs = [ "out" "dev" ]; nativeBuildInputs = [ autoreconfHook ]; propagatedBuildInputs = [ audiofile libtiff ]; meta = { description = "A portable and modular SIP User-Agent with audio and video support"; homepage = "https://github.com/freeswitch/spandsp"; platforms = with stdenv.lib.platforms; linux; maintainers = with stdenv.lib.maintainers; [ ajs124 ]; license = stdenv.lib.licenses.gpl2; }; } </ins>
<del> { stdenv, fetchFromGitHub, audiofile, libtiff, autoreconfHook }: </del> <ins> {stdenv, fetchurl, audiofile, libtiff}: </ins> stdenv.mkDerivation rec { <del> version = "3.0.0"; </del> <ins> version = "0.0.6"; </ins> pname = "spandsp"; <del> src = fetchFromGitHub { owner = "freeswitch"; repo = pname; rev = "6ec23e5a7e411a22d59e5678d12c4d2942c4a4b6"; # upstream does not seem to believe in tags sha256 = "03w0s99y3zibi5fnvn8lk92dggfgrr0mz5255745jfbz28b2d5y7"; </del> <ins> src=fetchurl { url = "https://www.soft-switch.org/downloads/spandsp/spandsp-${version}.tar.gz"; sha256 = "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"; </ins> }; outputs = [ "out" "dev" ]; <del> nativeBuildInputs = [ autoreconfHook ]; propagatedBuildInputs = [ audiofile libtiff ]; </del> <ins> propagatedBuildInputs = [audiofile libtiff]; </ins> meta = { description = "A portable and modular SIP User-Agent with audio and video support"; <del> homepage = "https://github.com/freeswitch/spandsp"; </del> <ins> homepage = "http://www.creytiv.com/baresip.html"; </ins> platforms = with stdenv.lib.platforms; linux; maintainers = with stdenv.lib.maintainers; [raskin]; license = stdenv.lib.licenses.gpl2; <ins> downloadPage = "http://www.soft-switch.org/downloads/spandsp/"; inherit version; updateWalker = true; </ins> }; }
snom = mk "applications/mod_snom" []; sonar = mk "applications/mod_sonar" []; soundtouch = mk "applications/mod_soundtouch" []; <del> spandsp = mk "applications/mod_spandsp" [ spandsp ]; </del> <ins> spandsp = mk "applications/mod_spandsp" [ spandsp3 ]; </ins> spy = mk "applications/mod_spy" []; stress = mk "applications/mod_stress" []; translate = mk "applications/mod_translate" [];
]; prePatch = '' <del> sed 's_shotcutPath, "qmelt"_"${mlt}/bin/melt"_' -i src/jobs/meltjob.cpp </del> <ins> sed 's_shotcutPath, "melt"_"${mlt}/bin/melt"_' -i src/jobs/meltjob.cpp </ins> sed 's_shotcutPath, "ffmpeg"_"${mlt.ffmpeg}/bin/ffmpeg"_' -i src/jobs/ffmpegjob.cpp sed 's_qApp->applicationDirPath(), "ffmpeg"_"${mlt.ffmpeg}/bin/ffmpeg"_' -i src/docks/encodedock.cpp NICE=$(type -P nice)
<ins> # Citrix Workspace {#sec-citrix} The [Citrix Workspace App](https://www.citrix.com/products/workspace-app/) is a remote desktop viewer which provides access to [XenDesktop](https://www.citrix.com/products/xenapp-xendesktop/) installations. ## Basic usage {#sec-citrix-base} The tarball archive needs to be downloaded manually as the license agreements of the vendor for [Citrix Workspace](https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html) needs to be accepted first. Then run `nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz`. With the archive available in the store the package can be built and installed with Nix. ## Citrix Selfservice {#sec-citrix-selfservice} The [selfservice](https://support.citrix.com/article/CTX200337) is an application managing Citrix desktops and applications. Please note that this feature only works with at least citrix_workspace_20_06_0 and later versions. In order to set this up, you first have to [download the `.cr` file from the Netscaler Gateway](https://its.uiowa.edu/support/article/102186). After that you can configure the `selfservice` like this: ```ShellSession $ storebrowse -C ~/Downloads/receiverconfig.cr $ selfservice ``` ## Custom certificates {#sec-citrix-custom-certs} The `Citrix Workspace App` in `nixpkgs` trusts several certificates [from the Mozilla database](https://curl.haxx.se/docs/caextract.html) by default. However several companies using Citrix might require their own corporate certificate. On distros with imperative packaging these certs can be stored easily in [`$ICAROOT`](https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/), however this directory is a store path in `nixpkgs`. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using `symlinkJoin`: ```nix with import <nixpkgs> { config.allowUnfree = true; }; let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem # ... ]; in citrix_workspace.override { inherit extraCerts; } ``` </ins>
<para> This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org. </para> <del> <xi:include href="citrix.xml" /> </del> <ins> <xi:include href="citrix.section.xml" /> </ins> <xi:include href="dlib.xml" /> <xi:include href="eclipse.section.xml" /> <xi:include href="elm.section.xml" />
<xi:include href="shell-helpers.xml" /> <xi:include href="steam.xml" /> <xi:include href="cataclysm-dda.section.xml" /> <del> <xi:include href="urxvt.xml" /> </del> <ins> <xi:include href="urxvt.section.xml" /> </ins> <xi:include href="weechat.section.xml" /> <xi:include href="xorg.section.xml" /> </chapter>
<ins> # Urxvt {#sec-urxvt} Urxvt, also known as rxvt-unicode, is a highly customizable terminal emulator. ## Configuring urxvt {#sec-urxvt-conf} In `nixpkgs`, urxvt is provided by the package `rxvt-unicode`. It can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, use an overlay or directly install an expression that overrides its configuration, such as ```nix rxvt-unicode.override { configure = { availablePlugins, ... }: { plugins = with availablePlugins; [ perls resize-font vtwheel ]; }; } ``` If the `configure` function returns an attrset without the `plugins` attribute, `availablePlugins` will be used automatically. In order to add plugins but also keep all default plugins installed, it is possible to use the following method: ```nix rxvt-unicode.override { configure = { availablePlugins, ... }: { plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ]; }; } ``` To get a list of all the plugins available, open the Nix REPL and run ```ShellSession $ nix repl :l <nixpkgs> map (p: p.name) pkgs.rxvt-unicode.plugins ``` Alternatively, if your shell is bash or zsh and have completion enabled, simply type `nixpkgs.rxvt-unicode.plugins.<tab>`. In addition to `plugins` the options `extraDeps` and `perlDeps` can be used to install extra packages. `extraDeps` can be used, for example, to provide `xsel` (a clipboard manager) to the clipboard plugin, without installing it globally: ```nix rxvt-unicode.override { configure = { availablePlugins, ... }: { pluginsDeps = [ xsel ]; }; } ``` `perlDeps` is a handy way to provide Perl packages to your custom plugins (in `$HOME/.urxvt/ext`). For example, if you need `AnyEvent` you can do: ```nix rxvt-unicode.override { configure = { availablePlugins, ... }: { perlDeps = with perlPackages; [ AnyEvent ]; }; } ``` ## Packaging urxvt plugins {#sec-urxvt-pkg} Urxvt plugins resides in `pkgs/applications/misc/rxvt-unicode-plugins`. To add a new plugin create an expression in a subdirectory and add the package to the set in `pkgs/applications/misc/rxvt-unicode-plugins/default.nix`. A plugin can be any kind of derivation, the only requirement is that it should always install perl scripts in `$out/lib/urxvt/perl`. Look for existing plugins for examples. If the plugin is itself a perl package that needs to be imported from other plugins or scripts, add the following passthrough: ```nix passthru.perlPackages = [ "self" ]; ``` This will make the urxvt wrapper pick up the dependency and set up the perl path accordingly. </ins>
</listitem> <listitem> <para> <ins> ZFS module will not allow hibernation by default, this is a safety measure to prevent data loss cases like the ones described at <link xlink:href="https://github.com/openzfs/zfs/issues/260">OpenZFS/260</link> and <link xlink:href="https://github.com/openzfs/zfs/issues/12842">OpenZFS/12842</link>. Use the <literal>boot.zfs.allowHibernation</literal> option to configure this behaviour. </para> </listitem> <listitem> <para> </ins> The Redis module now disables RDB persistence when <literal>services.redis.servers.&lt;name&gt;.save = []</literal> instead of using the Redis default.
- A new module was added for the Saleae Logic device family, providing the options `hardware.saleae-logic.enable` and `hardware.saleae-logic.package`. <ins> - ZFS module will not allow hibernation by default, this is a safety measure to prevent data loss cases like the ones described at [OpenZFS/260](https://github.com/openzfs/zfs/issues/260) and [OpenZFS/12842](https://github.com/openzfs/zfs/issues/12842). Use the `boot.zfs.allowHibernation` option to configure this behaviour. </ins> - The Redis module now disables RDB persistence when `services.redis.servers.<name>.save = []` instead of using the Redis default. - Neo4j was updated from version 3 to version 4. See this [migration guide](https://neo4j.com/docs/upgrade-migration-guide/current/) on how to migrate your Neo4j instance.
boot = { kernelModules = [ "zfs" ]; <ins> # https://github.com/openzfs/zfs/issues/260 # https://github.com/openzfs/zfs/issues/12842 # https://github.com/NixOS/nixpkgs/issues/106093 kernelParams = lib.optionals (!config.boot.zfs.allowHibernation) [ "nohibernate" ]; </ins> extraModulePackages = [ (if config.boot.zfs.enableUnstable then
# link in the CLI utils (map (util: "ln -s ${base}/bin/${util} $out/bin/${util}") utils) <ins> "runHook postInstall" </ins> ]) ) ; <ins> postInstall = '' mkdir -p $out/share ln -s ${base}/share/applications $out/share/applications ln -s ${base}/share/icons $out/share/icons ln -s ${base}/share/mime $out/share/mime ''; </ins> # can't run this for each pname # stable and unstable are in the same versions.nix # and kicad-small reuses stable
KiCad is an open source software suite for Electronic Design Automation. The Programs handle Schematic Capture, and PCB Layout with Gerber output. ''; <del> license = lib.licenses.agpl3; </del> <ins> license = lib.licenses.gpl3Plus; </ins> # berce seems inactive... maintainers = with lib.maintainers; [ evils kiwi berce ]; # kicad is cross platform
"--enable-vendor" "--build=${rust.toRustTargetSpec stdenv.buildPlatform}" "--host=${rust.toRustTargetSpec stdenv.hostPlatform}" <del> "--target=${rust.toRustTargetSpec stdenv.targetPlatform}" </del> <ins> # std is built for all platforms in --target. When building a cross-compiler # we need to add the host platform as well so rustc can compile build.rs # scripts. "--target=${concatStringsSep "," ([ (rust.toRustTargetSpec stdenv.targetPlatform) ] ++ optionals (stdenv.hostPlatform != stdenv.targetPlatform) [ (rust.toRustTargetSpec stdenv.hostPlatform) ])}" </ins> "${setBuild}.cc=${ccForBuild}" "${setHost}.cc=${ccForHost}"
Based on <xref linkend="opt-system.stateVersion" />, existing installations will continue to work. </para> </listitem> <ins> <listitem> <para> The prometheus json exporter is now managed by the prometheus community. Together with additional features some backwards incompatibilities were introduced. Most importantly the exporter no longer accepts a fixed command-line parameter to specify the URL of the endpoint serving JSON. It now expects this URL to be passed as an URL parameter, when scraping the exporter's <literal>/probe</literal> endpoint. In the prometheus scrape configuration the scrape target might look like this: <programlisting> http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/endpoint </programlisting> </para> <para> Existing configuration for the exporter needs to be updated, but can partially be re-used. Documentation is available in the upstream repository and a small example for NixOS is available in the corresponding NixOS test. </para> <para> These changes also affect <xref linkend="opt-services.prometheus.exporters.rspamd.enable" />, which is just a preconfigured instance of the json exporter. </para> <para> For more information, take a look at the <link xlink:href="https://github.com/prometheus-community/json_exporter"> official documentation</link> of the json_exporter. </para> </listitem> </ins> </itemizedlist> </section>
services.prometheus.exporters.minio.minioAddress  = mkDefault "http://localhost:9000"; services.prometheus.exporters.minio.minioAccessKey = mkDefault config.services.minio.accessKey; services.prometheus.exporters.minio.minioAccessSecret = mkDefault config.services.minio.secretKey; <del> })] ++ [(mkIf config.services.rspamd.enable { services.prometheus.exporters.rspamd.url = mkDefault "http://localhost:11334/stat"; </del> })] ++ [(mkIf config.services.prometheus.exporters.rtl_433.enable { hardware.rtl-sdr.enable = mkDefault true; })] ++ [(mkIf config.services.nginx.enable {
{ port = 7979; extraOpts = { <del> url = mkOption { type = types.str; description = '' URL to scrape JSON from. ''; }; </del> configFile = mkOption { type = types.path; description = '' Path to configuration file. ''; }; <del> listenAddress = {}; # not used </del> }; serviceOpts = { serviceConfig = { ExecStart = '' <del> ${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter  --port ${toString cfg.port}  ${cfg.url} ${escapeShellArg cfg.configFile}  </del> <ins> ${pkgs.prometheus-json-exporter}/bin/json_exporter  --config.file ${escapeShellArg cfg.configFile}  --web.listen-address="${cfg.listenAddress}:${toString cfg.port}"  </ins> ${concatStringsSep " n  " cfg.extraFlags} ''; }; }; <ins> imports = [ (mkRemovedOptionModule [ "url" ] '' This option was removed. The URL of the endpoint serving JSON must now be provided to the exporter by prometheus via the url parameter `target'. In prometheus a scrape URL would look like this: http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/endpoint For more information, take a look at the official documentation (https://github.com/prometheus-community/json_exporter) of the json_exporter. '') ({ options.warnings = options.warnings; options.assertions = options.assertions; }) ]; </ins> }
echo '${builtins.toJSON conf}' | ${pkgs.buildPackages.jq}/bin/jq '.' > $out ''; <del> generateConfig = extraLabels: (map (path: { name = "rspamd_${replaceStrings [ "." " " ] [ "_" "_" ] path}"; path = "$.${path}"; labels = extraLabels; }) [ "actions.'add header'" "actions.'no action'" "actions.'rewrite subject'" "actions.'soft reject'" "actions.greylist" "actions.reject" "bytes_allocated" "chunks_allocated" "chunks_freed" "chunks_oversized" "connections" "control_connections" "ham_count" "learned" "pools_allocated" "pools_freed" "read_only" "scanned" "shared_chunks_allocated" "spam_count" "total_learns" ]) ++ [{ name = "rspamd_statfiles"; type = "object"; path = "$.statfiles[*]"; labels = recursiveUpdate { symbol = "$.symbol"; type = "$.type"; } extraLabels; values = { revision = "$.revision"; size = "$.size"; total = "$.total"; used = "$.used"; languages = "$.languages"; users = "$.users"; }; }]; </del> <ins> generateConfig = extraLabels: { metrics = (map (path: { name = "rspamd_${replaceStrings [ "." " " ] [ "_" "_" ] path}"; path = "$.${path}"; labels = extraLabels; }) [ "actions.'add header'" "actions.'no action'" "actions.'rewrite subject'" "actions.'soft reject'" "actions.greylist" "actions.reject" "bytes_allocated" "chunks_allocated" "chunks_freed" "chunks_oversized" "connections" "control_connections" "ham_count" "learned" "pools_allocated" "pools_freed" "read_only" "scanned" "shared_chunks_allocated" "spam_count" "total_learns" ]) ++ [{ name = "rspamd_statfiles"; type = "object"; path = "$.statfiles[*]"; labels = recursiveUpdate { symbol = "$.symbol"; type = "$.type"; } extraLabels; values = { revision = "$.revision"; size = "$.size"; total = "$.total"; used = "$.used"; languages = "$.languages"; users = "$.users"; }; }]; }; </ins> in { port = 7980; extraOpts = { <del> listenAddress = {}; # not used url = mkOption { type = types.str; description = '' URL to the rspamd metrics endpoint. Defaults to http://localhost:11334/stat when <option>services.rspamd.enable</option> is true. ''; }; </del> extraLabels = mkOption { type = types.attrsOf types.str; default = {