diff options
author | Domen Kožar <domen@dev.si> | 2016-02-27 10:08:37 +0000 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2016-02-27 10:08:37 +0000 |
commit | 04422bb3ca8f1c09ac45817f6926199f9bfbf84f (patch) | |
tree | 6fc31a73fb4595e5f348657cf2f36de90ce606ae /nixos/modules/services | |
parent | 13afef0d8ec6058e8d42f3ea8cb1f0932bef0c2f (diff) | |
parent | 392ca77d4c0c5e05ad23378de370ea964c29848f (diff) | |
download | nixlib-04422bb3ca8f1c09ac45817f6926199f9bfbf84f.tar nixlib-04422bb3ca8f1c09ac45817f6926199f9bfbf84f.tar.gz nixlib-04422bb3ca8f1c09ac45817f6926199f9bfbf84f.tar.bz2 nixlib-04422bb3ca8f1c09ac45817f6926199f9bfbf84f.tar.lz nixlib-04422bb3ca8f1c09ac45817f6926199f9bfbf84f.tar.xz nixlib-04422bb3ca8f1c09ac45817f6926199f9bfbf84f.tar.zst nixlib-04422bb3ca8f1c09ac45817f6926199f9bfbf84f.zip |
Merge pull request #8630 from lihop/nixos/fix-formatting
nixos: fix formatting of option examples
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/nsd.nix | 53 | ||||
-rw-r--r-- | nixos/modules/services/security/fail2ban.nix | 28 | ||||
-rw-r--r-- | nixos/modules/services/web-servers/phpfpm.nix | 25 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 17 |
4 files changed, 65 insertions, 58 deletions
diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index e85f26811257..10566310041e 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -621,34 +621,37 @@ in zones = mkOption { type = types.attrsOf zoneOptions; default = {}; - example = { - "serverGroup1" = { - provideXFR = [ "10.1.2.3 NOKEY" ]; - children = { - "example.com." = { - data = '' - $ORIGIN example.com. - $TTL 86400 - @ IN SOA a.ns.example.com. admin.example.com. ( - ... - ''; - }; - "example.org." = { - data = '' - $ORIGIN example.org. - $TTL 86400 - @ IN SOA a.ns.example.com. admin.example.com. ( - ... - ''; + example = literalExample '' + { "serverGroup1" = { + provideXFR = [ "10.1.2.3 NOKEY" ]; + children = { + "example.com." = { + data = ''' + $ORIGIN example.com. + $TTL 86400 + @ IN SOA a.ns.example.com. admin.example.com. ( + ... + '''; + }; + "example.org." = { + data = ''' + $ORIGIN example.org. + $TTL 86400 + @ IN SOA a.ns.example.com. admin.example.com. ( + ... + '''; + }; }; }; - }; - "example.net." = { - provideXFR = [ "10.3.2.1 NOKEY" ]; - data = ''...''; - }; - }; + "example.net." = { + provideXFR = [ "10.3.2.1 NOKEY" ]; + data = ''' + ... + '''; + }; + } + ''; description = '' Define your zones here. Zones can cascade other zones and therefore inherit settings from parent zones. Look at the definition of diff --git a/nixos/modules/services/security/fail2ban.nix b/nixos/modules/services/security/fail2ban.nix index 1d3e18dcab25..afbd81be91f2 100644 --- a/nixos/modules/services/security/fail2ban.nix +++ b/nixos/modules/services/security/fail2ban.nix @@ -50,20 +50,20 @@ in jails = mkOption { default = { }; - example = - { "apache-nohome-iptables" = - '' - # Block an IP address if it accesses a non-existent - # home directory more than 5 times in 10 minutes, - # since that indicates that it's scanning. - filter = apache-nohome - action = iptables-multiport[name=HTTP, port="http,https"] - logpath = /var/log/httpd/error_log* - findtime = 600 - bantime = 600 - maxretry = 5 - ''; - }; + example = literalExample '' + { apache-nohome-iptables = ''' + # Block an IP address if it accesses a non-existent + # home directory more than 5 times in 10 minutes, + # since that indicates that it's scanning. + filter = apache-nohome + action = iptables-multiport[name=HTTP, port="http,https"] + logpath = /var/log/httpd/error_log* + findtime = 600 + bantime = 600 + maxretry = 5 + '''; + } + ''; type = types.attrsOf types.lines; description = '' diff --git a/nixos/modules/services/web-servers/phpfpm.nix b/nixos/modules/services/web-servers/phpfpm.nix index 277180fe139d..6a60000ce19e 100644 --- a/nixos/modules/services/web-servers/phpfpm.nix +++ b/nixos/modules/services/web-servers/phpfpm.nix @@ -53,18 +53,19 @@ in { poolConfigs = mkOption { type = types.attrsOf types.lines; default = {}; - example = { - mypool = '' - listen = /run/phpfpm/mypool - user = nobody - pm = dynamic - pm.max_children = 75 - pm.start_servers = 10 - pm.min_spare_servers = 5 - pm.max_spare_servers = 20 - pm.max_requests = 500 - ''; - }; + example = literalExample '' + { mypool = ''' + listen = /run/phpfpm/mypool + user = nobody + pm = dynamic + pm.max_children = 75 + pm.start_servers = 10 + pm.min_spare_servers = 5 + pm.max_spare_servers = 20 + pm.max_requests = 500 + '''; + } + ''; description = '' A mapping between PHP FPM pool names and their configurations. See the documentation on <literal>php-fpm.conf</literal> for diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 653c97d7e6fa..cfe5e7f960c7 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -156,13 +156,16 @@ in inputClassSections = mkOption { type = types.listOf types.lines; default = []; - example = [ '' - Identifier "Trackpoint Wheel Emulation" - MatchProduct "ThinkPad USB Keyboard with TrackPoint" - Option "EmulateWheel" "true - Option "EmulateWheelButton" "2" - Option "Emulate3Buttons" "false" - '' ]; + example = literalExample '' + [ ''' + Identifier "Trackpoint Wheel Emulation" + MatchProduct "ThinkPad USB Keyboard with TrackPoint" + Option "EmulateWheel" "true + Option "EmulateWheelButton" "2" + Option "Emulate3Buttons" "false" + ''' + ] + ''; description = "Content of additional InputClass sections of the X server configuration file."; }; |