{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8630","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8630/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8630/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8630/events","html_url":"https://github.com/NixOS/nixpkgs/pull/8630","id":92990060,"number":8630,"title":"nixos: fix formatting of option examples","user":{"login":"lihop","id":3696783,"avatar_url":"https://avatars.githubusercontent.com/u/3696783?v=3","gravatar_id":"","url":"https://api.github.com/users/lihop","html_url":"https://github.com/lihop","followers_url":"https://api.github.com/users/lihop/followers","following_url":"https://api.github.com/users/lihop/following{/other_user}","gists_url":"https://api.github.com/users/lihop/gists{/gist_id}","starred_url":"https://api.github.com/users/lihop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lihop/subscriptions","organizations_url":"https://api.github.com/users/lihop/orgs","repos_url":"https://api.github.com/users/lihop/repos","events_url":"https://api.github.com/users/lihop/events{/privacy}","received_events_url":"https://api.github.com/users/lihop/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/documentation","name":"documentation","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-04T08:37:05Z","updated_at":"2015-07-04T22:43:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/8630","html_url":"https://github.com/NixOS/nixpkgs/pull/8630","diff_url":"https://github.com/NixOS/nixpkgs/pull/8630.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/8630.patch"},"body":"A number of option examples in the Configuration Options section of the manual are badly formatted.\r\nFor instance, the [services.fail2ban.jails](https://nixos.org/nixos/manual/ch-options.html#opt-services.fail2ban.jails) option example looks like this (the image cuts off the full example):\r\n\r\n![fail2ban-before](https://cloud.githubusercontent.com/assets/3696783/8507070/09ddefac-2287-11e5-918f-67f7f614a772.png)\r\n\r\nI found eight other examples in the manual which are also badly formatted:\r\n\r\n* [networking.vpnc.services](https://nixos.org/nixos/manual/ch-options.html#opt-networking.vpnc.services)\r\n* [environment.freetds](https://nixos.org/nixos/manual/ch-options.html#opt-environment.freetds)\r\n* [security.pki.certificates](https://nixos.org/nixos/manual/ch-options.html#opt-security.pki.certificates)\r\n* [services.nsd.zones](https://nixos.org/nixos/manual/ch-options.html#opt-services.nsd.zones)\r\n* [services.phpfpm.poolConfigs](https://nixos.org/nixos/manual/ch-options.html#opt-services.phpfpm.poolConfigs)\r\n* [services.zope2.instances](https://nixos.org/nixos/manual/ch-options.html#opt-services.zope2.instances)\r\n* [services.xserver.inputClassSections](https://nixos.org/nixos/manual/ch-options.html#opt-services.xserver.inputClassSections)\r\n* [system.activationScripts](https://nixos.org/nixos/manual/ch-options.html#opt-system.activationScripts)\r\n\r\nThese commits use the `literalExample` function to properly format the examples like so:\r\n\r\n![fail2ban-after](https://cloud.githubusercontent.com/assets/3696783/8507068/02de3374-2287-11e5-9de2-16e3c1965cbd.png)\r\n\r\nThe manual has been built on master and checked.\r\n\r\nI thought it would be cleaner to make a separate commit for each module, but I can squash the commits into one if you would prefer.\r\n\r\nCheers\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/118560925","html_url":"https://github.com/NixOS/nixpkgs/pull/8630#issuecomment-118560925","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/8630","id":118560925,"user":{"login":"lihop","id":3696783,"avatar_url":"https://avatars.githubusercontent.com/u/3696783?v=3","gravatar_id":"","url":"https://api.github.com/users/lihop","html_url":"https://github.com/lihop","followers_url":"https://api.github.com/users/lihop/followers","following_url":"https://api.github.com/users/lihop/following{/other_user}","gists_url":"https://api.github.com/users/lihop/gists{/gist_id}","starred_url":"https://api.github.com/users/lihop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lihop/subscriptions","organizations_url":"https://api.github.com/users/lihop/orgs","repos_url":"https://api.github.com/users/lihop/repos","events_url":"https://api.github.com/users/lihop/events{/privacy}","received_events_url":"https://api.github.com/users/lihop/received_events","type":"User","site_admin":false},"created_at":"2015-07-04T22:43:39Z","updated_at":"2015-07-04T22:43:39Z","body":"@offlinehacker Agreed.\r\n\r\nFor example, the \"default\" value of [fonts.fontconfig.ultimate.rendering](https://nixos.org/nixos/manual/ch-options.html#opt-fonts.fontconfig.ultimate.rendering) is also badly formatted in the manual, but this cannot be fixed using the `literalExample` function because then the module, by default, would set the option to be text rather than an attribute set.\r\n\r\nGetting the document generator to support correctly displaying attribute sets (and lists) would solve this."}}