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.
This commit is contained in:
Bjørn Forsman 2017-02-15 09:07:16 +01:00
parent a45821e7a8
commit f9cb2b5640

View File

@ -99,15 +99,17 @@ in
security.wrappers = lib.mkOption { security.wrappers = lib.mkOption {
type = lib.types.attrs; type = lib.types.attrs;
default = {}; default = {};
example = { example = lib.literalExample
sendmail.source = "/nix/store/.../bin/sendmail"; ''
{ sendmail.source = "/nix/store/.../bin/sendmail";
ping = { ping = {
source = "${pkgs.iputils.out}/bin/ping"; source = "${pkgs.iputils.out}/bin/ping";
owner = "nobody"; owner = "nobody";
group = "nogroup"; group = "nogroup";
capabilities = "cap_net_raw+ep"; capabilities = "cap_net_raw+ep";
}; };
}; }
'';
description = '' description = ''
This option allows the ownership and permissions on the setuid This option allows the ownership and permissions on the setuid
wrappers for specific programs to be overridden from the wrappers for specific programs to be overridden from the