From f9cb2b56402a76b51fa9fd25a947372f5ec6ff81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Wed, 15 Feb 2017 09:07:16 +0100 Subject: [PATCH] nixos/security.wrappers: use literalExample in documentation It's much more readable when the example attrset is pretty printed instead of written as one line. --- nixos/modules/security/wrappers/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix index cdf7e5a1765..98913a974fc 100644 --- a/nixos/modules/security/wrappers/default.nix +++ b/nixos/modules/security/wrappers/default.nix @@ -99,15 +99,17 @@ in security.wrappers = lib.mkOption { type = lib.types.attrs; default = {}; - example = { - sendmail.source = "/nix/store/.../bin/sendmail"; - ping = { - source = "${pkgs.iputils.out}/bin/ping"; - owner = "nobody"; - group = "nogroup"; - capabilities = "cap_net_raw+ep"; - }; - }; + example = lib.literalExample + '' + { sendmail.source = "/nix/store/.../bin/sendmail"; + ping = { + source = "${pkgs.iputils.out}/bin/ping"; + owner = "nobody"; + group = "nogroup"; + capabilities = "cap_net_raw+ep"; + }; + } + ''; description = '' This option allows the ownership and permissions on the setuid wrappers for specific programs to be overridden from the