git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #8630 from lihop/nixos/fix-formatting
04422bbDomen Kožar
nixos/modules/config/vpnc.nix+10−10
@@ -17,16 +17,16 @@ in
17 services = mkOption {
17 services = mkOption {
18 type = types.attrsOf types.str;
18 type = types.attrsOf types.str;
19 default = {};
19 default = {};
20− example = {
20+ example = literalExample ''
21− test =
21+ { test = '''
22− ''
23− IPSec gateway 192.168.1.1
22+ IPSec gateway 192.168.1.1
24− IPSec ID someID
23+ IPSec ID someID
25− IPSec secret secretKey
24+ IPSec secret secretKey
26− Xauth username name
25+ Xauth username name
27− Xauth password pass
26+ Xauth password pass
28− '';
27+ ''';
29− };
28+ }
29+ '';
30 description =
30 description =
31 ''
31 ''
32 The names of cisco VPNs and their associated definitions
32 The names of cisco VPNs and their associated definitions
nixos/modules/programs/freetds.nix+8−8
@@ -17,14 +17,14 @@ in
17 environment.freetds = mkOption {
17 environment.freetds = mkOption {
18 type = types.attrsOf types.str;
18 type = types.attrsOf types.str;
19 default = {};
19 default = {};
20− example = {
20+ example = literalExample ''
21− MYDATABASE =
21+ { MYDATABASE = '''
22− ''
23− host = 10.0.2.100
22+ host = 10.0.2.100
24− port = 1433
23+ port = 1433
25− tds version = 7.2
24+ tds version = 7.2
26− '';
25+ ''';
27− };
26+ }
27+ '';
28 description =
28 description =
29 ''
29 ''
30 Configure freetds database entries. Each attribute denotes
30 Configure freetds database entries. Each attribute denotes
nixos/modules/security/ca.nix+11−8
@@ -35,14 +35,17 @@ in
35 security.pki.certificates = mkOption {
35 security.pki.certificates = mkOption {
36 type = types.listOf types.str;
36 type = types.listOf types.str;
37 default = [];
37 default = [];
38− example = singleton ''
38+ example = literalExample ''
39+ [ '''
39− NixOS.org
40+ NixOS.org
40− =========
41+ =========
41− -----BEGIN CERTIFICATE-----
42+ -----BEGIN CERTIFICATE-----
42− MIIGUDCCBTigAwIBAgIDD8KWMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYDVQQGEwJJ
43+ MIIGUDCCBTigAwIBAgIDD8KWMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYDVQQGEwJJ
43− TDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0
44+ TDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0
44− ...
45+ ...
45− -----END CERTIFICATE-----
46+ -----END CERTIFICATE-----
47+ '''
48+ ]
46 '';
49 '';
47 description = ''
50 description = ''
48 A list of trusted root certificates in PEM format.
51 A list of trusted root certificates in PEM format.
nixos/modules/services/networking/nsd.nix+28−25
@@ -621,34 +621,37 @@ in
621 zones = mkOption {
621 zones = mkOption {
622 type = types.attrsOf zoneOptions;
622 type = types.attrsOf zoneOptions;
623 default = {};
623 default = {};
624− example = {
624+ example = literalExample ''
625− "serverGroup1" = {
625+ { "serverGroup1" = {
626− provideXFR = [ "10.1.2.3 NOKEY" ];
626+ provideXFR = [ "10.1.2.3 NOKEY" ];
627− children = {
627+ children = {
628− "example.com." = {
628+ "example.com." = {
629− data = ''
629+ data = '''
630− $ORIGIN example.com.
630+ $ORIGIN example.com.
631− $TTL 86400
631+ $TTL 86400
632− @ IN SOA a.ns.example.com. admin.example.com. (
632+ @ IN SOA a.ns.example.com. admin.example.com. (
633− ...
633+ ...
634− '';
634+ ''';
635− };
635+ };
636− "example.org." = {
636+ "example.org." = {
637− data = ''
637+ data = '''
638− $ORIGIN example.org.
638+ $ORIGIN example.org.
639− $TTL 86400
639+ $TTL 86400
640− @ IN SOA a.ns.example.com. admin.example.com. (
640+ @ IN SOA a.ns.example.com. admin.example.com. (
641− ...
641+ ...
642− '';
642+ ''';
643+ };
643 };
644 };
644 };
645 };
645− };
646
646
647− "example.net." = {
647+ "example.net." = {
648− provideXFR = [ "10.3.2.1 NOKEY" ];
648+ provideXFR = [ "10.3.2.1 NOKEY" ];
649− data = ''...'';
649+ data = '''
650+ ...
651+ ''';
650− };
652+ };
653+ }
651− };
654+ '';
652 description = ''
655 description = ''
653 Define your zones here. Zones can cascade other zones and therefore
656 Define your zones here. Zones can cascade other zones and therefore
654 inherit settings from parent zones. Look at the definition of
657 inherit settings from parent zones. Look at the definition of
nixos/modules/services/security/fail2ban.nix+14−14
@@ -50,20 +50,20 @@ in
50
50
51 jails = mkOption {
51 jails = mkOption {
52 default = { };
52 default = { };
53− example =
53+ example = literalExample ''
54− { "apache-nohome-iptables" =
54+ { apache-nohome-iptables = '''
55− ''
56− # Block an IP address if it accesses a non-existent
55+ # Block an IP address if it accesses a non-existent
57− # home directory more than 5 times in 10 minutes,
56+ # home directory more than 5 times in 10 minutes,
58− # since that indicates that it's scanning.
57+ # since that indicates that it's scanning.
59− filter = apache-nohome
58+ filter = apache-nohome
60− action = iptables-multiport[name=HTTP, port="http,https"]
59+ action = iptables-multiport[name=HTTP, port="http,https"]
61− logpath = /var/log/httpd/error_log*
60+ logpath = /var/log/httpd/error_log*
62− findtime = 600
61+ findtime = 600
63− bantime = 600
62+ bantime = 600
64− maxretry = 5
63+ maxretry = 5
65− '';
64+ ''';
66− };
65+ }
66+ '';
67 type = types.attrsOf types.lines;
67 type = types.attrsOf types.lines;
68 description =
68 description =
69 ''
69 ''
nixos/modules/services/web-servers/phpfpm.nix+13−12
@@ -53,18 +53,19 @@ in {
53 poolConfigs = mkOption {
53 poolConfigs = mkOption {
54 type = types.attrsOf types.lines;
54 type = types.attrsOf types.lines;
55 default = {};
55 default = {};
56− example = {
56+ example = literalExample ''
57− mypool = ''
57+ { mypool = '''
58− listen = /run/phpfpm/mypool
58+ listen = /run/phpfpm/mypool
59− user = nobody
59+ user = nobody
60− pm = dynamic
60+ pm = dynamic
61− pm.max_children = 75
61+ pm.max_children = 75
62− pm.start_servers = 10
62+ pm.start_servers = 10
63− pm.min_spare_servers = 5
63+ pm.min_spare_servers = 5
64− pm.max_spare_servers = 20
64+ pm.max_spare_servers = 20
65− pm.max_requests = 500
65+ pm.max_requests = 500
66− '';
66+ ''';
67− };
67+ }
68+ '';
68 description = ''
69 description = ''
69 A mapping between PHP FPM pool names and their configurations.
70 A mapping between PHP FPM pool names and their configurations.
70 See the documentation on <literal>php-fpm.conf</literal> for
71 See the documentation on <literal>php-fpm.conf</literal> for
nixos/modules/services/x11/xserver.nix+10−7
@@ -156,13 +156,16 @@ in
156 inputClassSections = mkOption {
156 inputClassSections = mkOption {
157 type = types.listOf types.lines;
157 type = types.listOf types.lines;
158 default = [];
158 default = [];
159− example = [ ''
159+ example = literalExample ''
160+ [ '''
160− Identifier "Trackpoint Wheel Emulation"
161+ Identifier "Trackpoint Wheel Emulation"
161− MatchProduct "ThinkPad USB Keyboard with TrackPoint"
162+ MatchProduct "ThinkPad USB Keyboard with TrackPoint"
162− Option "EmulateWheel" "true
163+ Option "EmulateWheel" "true
163− Option "EmulateWheelButton" "2"
164+ Option "EmulateWheelButton" "2"
164− Option "Emulate3Buttons" "false"
165+ Option "Emulate3Buttons" "false"
165− '' ];
166+ '''
167+ ]
168+ '';
166 description = "Content of additional InputClass sections of the X server configuration file.";
169 description = "Content of additional InputClass sections of the X server configuration file.";
167 };
170 };
168
171
nixos/modules/system/activation/activation-script.nix+13−12
@@ -30,18 +30,19 @@ in
30 system.activationScripts = mkOption {
30 system.activationScripts = mkOption {
31 default = {};
31 default = {};
32
32
33− example = {
33+ example = literalExample ''
34− stdio = {
34+ { stdio = {
35− text = ''
35+ text = '''
36− # Needed by some programs.
36+ # Needed by some programs.
37− ln -sfn /proc/self/fd /dev/fd
37+ ln -sfn /proc/self/fd /dev/fd
38− ln -sfn /proc/self/fd/0 /dev/stdin
38+ ln -sfn /proc/self/fd/0 /dev/stdin
39− ln -sfn /proc/self/fd/1 /dev/stdout
39+ ln -sfn /proc/self/fd/1 /dev/stdout
40− ln -sfn /proc/self/fd/2 /dev/stderr
40+ ln -sfn /proc/self/fd/2 /dev/stderr
41− '';
41+ ''';
42− deps = [];
42+ deps = [];
43+ };
43− };
44+ }
44− };
45+ '';
45
46
46 description = ''
47 description = ''
47 A set of shell script fragments that are executed when a NixOS
48 A set of shell script fragments that are executed when a NixOS