nixpkgs/nixos/modules/services/web-apps
Silvan Mosberger 1d0fc9729d
nixos/treewide: Fix incorrectly rendered examples
Many options define their example to be a Nix value without using
literalExample. This sometimes gets rendered incorrectly in the manual,
causing confusion like in https://github.com/NixOS/nixpkgs/issues/25516

This fixes it by using literalExample for such options. The list of
option to fix was determined with this expression:

  let
    nixos = import ./nixos { configuration = {}; };
    lib = import ./lib;
    valid = d: {
      # escapeNixIdentifier from https://github.com/NixOS/nixpkgs/pull/82461
      set = lib.all (n: lib.strings.escapeNixIdentifier n == n) (lib.attrNames d) && lib.all (v: valid v) (lib.attrValues d);
      list = lib.all (v: valid v) d;
    }.${builtins.typeOf d} or true;

    optionList = lib.optionAttrSetToDocList nixos.options;

  in map (opt: {
    file = lib.elemAt opt.declarations 0;
    loc = lib.options.showOption opt.loc;
  }) (lib.filter (opt: if opt ? example then ! valid opt.example else false) optionList)

which when evaluated will output all options that use a Nix identifier
that would need escaping as an attribute name.
2020-04-02 07:49:25 +02:00
..
atlassian
icingaweb2
ihatemoney
codimd.nix nixos/codimd: update useCDN default to false 2020-02-28 14:36:46 +01:00
cryptpad.nix
documize.nix
dokuwiki.nix nixos/dokuwiki: init module at 2018-04-22b 2020-01-24 13:27:10 +01:00
frab.nix treewide: use attrs instead of list for types.loaOf options 2020-01-06 10:39:18 -05:00
gerrit.nix nixos: add gerrit module 2020-03-26 09:28:42 +01:00
gotify-server.nix
grocy.nix nixos/grocy: init module 2020-02-09 21:55:27 +01:00
grocy.xml nixos/grocy: init module 2020-02-09 21:55:27 +01:00
jirafeau.nix nixos/jirefeau: add services.jirafeau module 2020-02-18 09:37:44 -08:00
limesurvey.nix nixos/httpd: code cleanup 2020-01-31 20:39:12 -05:00
matomo-doc.xml matomo: Fix consistency check 2019-11-18 14:52:47 +01:00
matomo.nix nixos/treewide: Move rename.nix imports to their respective modules 2019-12-10 02:51:19 +01:00
mattermost.nix Merge pull request #69125 from jslight90/mattermost-5.15 2020-02-12 20:56:00 -08:00
mediawiki.nix nixos/httpd: code cleanup 2020-01-31 20:39:12 -05:00
miniflux.nix
moinmoin.nix
moodle.nix nixos/httpd: code cleanup 2020-01-31 20:39:12 -05:00
nextcloud.nix nixos/nextcloud: add bcmap, mp4 and webm in nginx configuration 2020-03-29 09:34:52 +02:00
nextcloud.xml nixos/nextcloud: implement a safe upgrade-path between 19.09 and 20.03 2020-03-25 22:07:29 +01:00
nexus.nix
pgpkeyserver-lite.nix
restya-board.nix restya-board: fix configuration option and switch to file based password provisioning 2019-12-23 05:45:15 +01:00
selfoss.nix
shiori.nix
trac.nix
trilium.nix trilium-server: Add nginx reverse proxy configuration to module 2019-12-19 10:14:13 +01:00
tt-rss.nix
virtlyst.nix
wordpress.nix nixos/httpd: code cleanup 2020-01-31 20:39:12 -05:00
youtrack.nix nixos/treewide: Fix incorrectly rendered examples 2020-04-02 07:49:25 +02:00
zabbix.nix nixos/httpd: code cleanup 2020-01-31 20:39:12 -05:00