3
0
Fork 0
forked from mirrors/nixpkgs
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 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
icingaweb2 treewide: remove redundant quotes 2019-09-08 23:38:31 +00:00
ihatemoney ihatemoney: init at 4.1 plus module and test 2019-11-02 12:00:00 +00:00
codimd.nix nixos/codimd: update useCDN default to false 2020-02-28 14:36:46 +01:00
cryptpad.nix nixos/cryptpad: add module 2019-06-07 13:02:51 +02:00
documize.nix documize: introduce state directory 2019-10-05 00:40:44 +02:00
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 nixos/gotify: init module and test 2019-10-25 16:19:41 +02:00
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 treewide: Remove usage of isNull 2019-04-29 14:05:50 +02:00
moinmoin.nix nixos/moin: init 2019-10-25 17:51:09 +02:00
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 nexus: 3.18.1-01 -> 3.19.1-01 2019-10-28 21:34:55 +01:00
pgpkeyserver-lite.nix treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
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 treewide: remove redundant quotes 2019-09-08 23:38:31 +00:00
shiori.nix nixos/shiori: init with test 2019-09-22 18:48:07 +02:00
trac.nix nixos/trac: service init 2019-11-03 17:24:08 +01:00
trilium.nix trilium-server: Add nginx reverse proxy configuration to module 2019-12-19 10:14:13 +01:00
tt-rss.nix nixos/tt-rss: fix string escape 2019-09-17 00:23:51 +00:00
virtlyst.nix treewide: Switch to system users 2019-10-12 22:25:28 +02:00
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