Skip to content

Commit dd7d533

Browse files
committed
treewide: Fix incorrect string indentations
1 parent 6037338 commit dd7d533

File tree

16 files changed

+66
-44
lines changed

16 files changed

+66
-44
lines changed

lib/generators.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,12 @@ in rec {
606606

607607
in
608608
# TODO: As discussed in #356502, deprecated functionality should be removed sometime after 25.11.
609-
lib.warnIf (!escape && lib.oldestSupportedReleaseIsAtLeast 2505) "Using `lib.generators.toPlist` without `escape = true` is deprecated"
610-
''<?xml version="1.0" encoding="UTF-8"?>
611-
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
612-
<plist version="1.0">
613-
${expr "" v}
614-
</plist>'';
609+
lib.warnIf (!escape && lib.oldestSupportedReleaseIsAtLeast 2505) "Using `lib.generators.toPlist` without `escape = true` is deprecated" ''
610+
<?xml version="1.0" encoding="UTF-8"?>
611+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
612+
<plist version="1.0">
613+
${expr "" v}
614+
</plist>'';
615615

616616
/**
617617
Translate a simple Nix expression to Dhall notation.

lib/lists.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,8 +1748,8 @@ rec {
17481748
```
17491749
:::
17501750
*/
1751-
crossLists = warn
1752-
''lib.crossLists is deprecated, use lib.mapCartesianProduct instead.
1751+
crossLists = warn ''
1752+
lib.crossLists is deprecated, use lib.mapCartesianProduct instead.
17531753
17541754
For example, the following function call:
17551755

nixos/modules/services/backup/borgbackup.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ let
106106
path = [
107107
config.services.borgbackup.package pkgs.openssh
108108
];
109-
script = "exec " + lib.optionalString cfg.inhibitsSleep ''\
109+
script = "exec " + lib.optionalString cfg.inhibitsSleep ''
110110
${pkgs.systemd}/bin/systemd-inhibit \
111111
--who="borgbackup" \
112112
--what="sleep" \
@@ -183,7 +183,7 @@ let
183183
mode != "none" -> passCommand != null || passphrase != null;
184184
message =
185185
"passCommand or passphrase has to be specified because"
186-
+ '' borgbackup.jobs.${name}.encryption != "none"'';
186+
+ " borgbackup.jobs.${name}.encryption != \"none\"";
187187
};
188188

189189
mkRepoService = name: cfg:

nixos/modules/services/cluster/kubernetes/apiserver.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ in
320320
after = [ "network.target" ];
321321
serviceConfig = {
322322
Slice = "kubernetes.slice";
323-
ExecStart = ''${top.package}/bin/kube-apiserver \
323+
ExecStart = ''
324+
${top.package}/bin/kube-apiserver \
324325
--allow-privileged=${lib.boolToString cfg.allowPrivileged} \
325326
--authorization-mode=${lib.concatStringsSep "," cfg.authorizationMode} \
326327
${lib.optionalString (lib.elem "ABAC" cfg.authorizationMode)

nixos/modules/services/cluster/kubernetes/proxy.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ in
6565
path = with pkgs; [ iptables conntrack-tools ];
6666
serviceConfig = {
6767
Slice = "kubernetes.slice";
68-
ExecStart = ''${top.package}/bin/kube-proxy \
68+
ExecStart = ''
69+
${top.package}/bin/kube-proxy \
6970
--bind-address=${cfg.bindAddress} \
7071
${optionalString (top.clusterCidr!=null)
7172
"--cluster-cidr=${top.clusterCidr}"} \

nixos/modules/services/databases/redis.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ in {
211211
masterAuth = lib.mkOption {
212212
type = with types; nullOr str;
213213
default = null;
214-
description = ''If the master is password protected (using the requirePass configuration)
214+
description = ''
215+
If the master is password protected (using the requirePass configuration)
215216
it is possible to tell the slave to authenticate before starting the replication synchronization
216217
process, otherwise the master will refuse the slave request.
217218
(STORED PLAIN TEXT, WORLD-READABLE IN NIX STORE)'';

nixos/modules/services/desktops/pipewire/wireplumber.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ in
6161
# in sections.
6262
type = attrsOf (attrsOf json.type);
6363
default = { };
64-
example = literalExpression ''{
64+
example = literalExpression ''
65+
{
6566
"log-level-debug" = {
6667
"context.properties" = {
6768
# Output Debug log messages as opposed to only the default level (Notice)
@@ -88,7 +89,8 @@ in
8889
}
8990
];
9091
};
91-
}'';
92+
}
93+
'';
9294
description = ''
9395
Additional configuration for the WirePlumber daemon when run in
9496
single-instance mode (the default in nixpkgs and currently the only
@@ -166,7 +168,8 @@ in
166168
configPackages = mkOption {
167169
type = listOf package;
168170
default = [ ];
169-
example = literalExpression ''[
171+
example = literalExpression ''
172+
[
170173
(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/10-bluez.conf" '''
171174
monitor.bluez.properties = {
172175
bluez5.roles = [ a2dp_sink a2dp_source bap_sink bap_source hsp_hs hsp_ag hfp_hf hfp_ag ]
@@ -175,7 +178,8 @@ in
175178
bluez5.hfphsp-backend = "native"
176179
}
177180
''')
178-
]'';
181+
]
182+
'';
179183
description = ''
180184
List of packages that provide WirePlumber configuration, in the form of
181185
`share/wireplumber/*/*.conf` files.

nixos/modules/services/misc/gitlab.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,12 +1080,13 @@ in {
10801080
warnings = [
10811081
(mkIf
10821082
(cfg.registry.enable && versionAtLeast (getVersion cfg.packages.gitlab) "16.0.0" && cfg.registry.package == pkgs.docker-distribution)
1083-
''Support for container registries other than gitlab-container-registry has ended since GitLab 16.0.0 and is scheduled for removal in a future release.
1083+
''
1084+
Support for container registries other than gitlab-container-registry has ended since GitLab 16.0.0 and is scheduled for removal in a future release.
10841085
Please back up your data and migrate to the gitlab-container-registry package.''
10851086
)
10861087
(mkIf
1087-
(versionAtLeast (getVersion cfg.packages.gitlab) "16.2.0" && versionOlder (getVersion cfg.packages.gitlab) "16.5.0")
1088-
''GitLab instances created or updated between versions [15.11.0, 15.11.2] have an incorrect database schema.
1088+
(versionAtLeast (getVersion cfg.packages.gitlab) "16.2.0" && versionOlder (getVersion cfg.packages.gitlab) "16.5.0") ''
1089+
GitLab instances created or updated between versions [15.11.0, 15.11.2] have an incorrect database schema.
10891090
Check the upstream documentation for a workaround: https://docs.gitlab.com/ee/update/versions/gitlab_16_changes.html#undefined-column-error-upgrading-to-162-or-later''
10901091
)
10911092
];

nixos/modules/services/network-filesystems/ceph.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ let
4242
StateDirectory = stateDirectory;
4343
User = "ceph";
4444
Group = if daemonType == "osd" then "disk" else "ceph";
45-
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
46-
-f --cluster ${clusterName} --id ${daemonId}'';
45+
ExecStart = ''
46+
${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
47+
-f --cluster ${clusterName} --id ${daemonId}'';
4748
} // lib.optionalAttrs (daemonType == "osd") {
4849
ExecStartPre = "${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}";
4950
RestartSec = "20s";

nixos/modules/services/networking/smokeping.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ in
119119
MAX 0.5 144 7200
120120
MIN 0.5 144 7200
121121
'';
122-
description = ''Configure the ping frequency and retention of the rrd files.
122+
description = ''
123+
Configure the ping frequency and retention of the rrd files.
123124
Once set, changing the interval will require deletion or migration of all
124125
the collected data.'';
125126
};

nixos/modules/services/networking/tinyproxy.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ in
3333
settings = mkOption {
3434
description = "Configuration for [tinyproxy](https://tinyproxy.github.io/).";
3535
default = { };
36-
example = literalExpression ''{
36+
example = literalExpression ''
37+
{
3738
Port 8888;
3839
Listen 127.0.0.1;
3940
Timeout 600;
4041
Allow 127.0.0.1;
4142
Anonymous = ['"Host"' '"Authorization"'];
4243
ReversePath = '"/example/" "http://www.example.com/"';
43-
}'';
44+
}
45+
'';
4446
type = types.submodule ({name, ...}: {
4547
freeformType = settingsFormat.type;
4648
options = {

nixos/modules/services/networking/wg-quick.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ let
194194
allowedIPs = mkOption {
195195
example = [ "10.192.122.3/32" "10.192.124.1/24" ];
196196
type = with types; listOf str;
197-
description = ''List of IP (v4 or v6) addresses with CIDR masks from
197+
description = ''
198+
List of IP (v4 or v6) addresses with CIDR masks from
198199
which this peer is allowed to send incoming traffic and to which
199200
outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may
200201
be specified for matching all IPv4 addresses, and ::/0 may be specified
@@ -205,15 +206,17 @@ let
205206
default = null;
206207
example = "demo.wireguard.io:12913";
207208
type = with types; nullOr str;
208-
description = ''Endpoint IP or hostname of the peer, followed by a colon,
209+
description = ''
210+
Endpoint IP or hostname of the peer, followed by a colon,
209211
and then a port number of the peer.'';
210212
};
211213

212214
persistentKeepalive = mkOption {
213215
default = null;
214216
type = with types; nullOr int;
215217
example = 25;
216-
description = ''This is optional and is by default off, because most
218+
description = ''
219+
This is optional and is by default off, because most
217220
users will not need it. It represents, in seconds, between 1 and 65535
218221
inclusive, how often to send an authenticated empty packet to the peer,
219222
for the purpose of keeping a stateful firewall or NAT mapping valid

nixos/modules/services/networking/wireguard.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ let
127127
default = null;
128128
type = with types; nullOr str;
129129
example = "container";
130-
description = ''The pre-existing network namespace in which the
130+
description = ''
131+
The pre-existing network namespace in which the
131132
WireGuard interface is created, and which retains the socket even if the
132133
interface is moved via {option}`interfaceNamespace`. When
133134
`null`, the interface is created in the init namespace.
@@ -139,7 +140,8 @@ let
139140
default = null;
140141
type = with types; nullOr str;
141142
example = "init";
142-
description = ''The pre-existing network namespace the WireGuard
143+
description = ''
144+
The pre-existing network namespace the WireGuard
143145
interface is moved to. The special value `init` means
144146
the init namespace. When `null`, the interface is not
145147
moved.
@@ -262,7 +264,8 @@ let
262264
allowedIPs = mkOption {
263265
example = [ "10.192.122.3/32" "10.192.124.1/24" ];
264266
type = with types; listOf str;
265-
description = ''List of IP (v4 or v6) addresses with CIDR masks from
267+
description = ''
268+
List of IP (v4 or v6) addresses with CIDR masks from
266269
which this peer is allowed to send incoming traffic and to which
267270
outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may
268271
be specified for matching all IPv4 addresses, and ::/0 may be specified
@@ -328,7 +331,8 @@ let
328331
default = null;
329332
type = with types; nullOr int;
330333
example = 25;
331-
description = ''This is optional and is by default off, because most
334+
description = ''
335+
This is optional and is by default off, because most
332336
users will not need it. It represents, in seconds, between 1 and 65535
333337
inclusive, how often to send an authenticated empty packet to the peer,
334338
for the purpose of keeping a stateful firewall or NAT mapping valid

nixos/modules/services/web-apps/galene.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ in
150150
User = cfg.user;
151151
Group = cfg.group;
152152
WorkingDirectory = cfg.stateDir;
153-
ExecStart = ''${cfg.package}/bin/galene \
153+
ExecStart = ''
154+
${cfg.package}/bin/galene \
154155
${optionalString (cfg.insecure) "-insecure"} \
155156
-http ${cfg.httpAddress}:${toString cfg.httpPort} \
156157
-turn ${cfg.turnAddress} \

nixos/modules/services/web-apps/nextcloud.nix

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -770,15 +770,17 @@ in {
770770
description = ''
771771
Extra options which should be appended to Nextcloud's config.php file.
772772
'';
773-
example = literalExpression '' {
774-
redis = {
775-
host = "/run/redis/redis.sock";
776-
port = 0;
777-
dbindex = 0;
778-
password = "secret";
779-
timeout = 1.5;
780-
};
781-
} '';
773+
example = literalExpression ''
774+
{
775+
redis = {
776+
host = "/run/redis/redis.sock";
777+
port = 0;
778+
dbindex = 0;
779+
password = "secret";
780+
timeout = 1.5;
781+
};
782+
}
783+
'';
782784
};
783785

784786
secretFile = mkOption {

nixos/modules/system/activation/top-level.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ in
319319

320320
system.extraSystemBuilderCmds =
321321
optionalString
322-
config.system.copySystemConfiguration
323-
''ln -s '${import ../../../lib/from-env.nix "NIXOS_CONFIG" <nixos-config>}' \
322+
config.system.copySystemConfiguration ''
323+
ln -s '${import ../../../lib/from-env.nix "NIXOS_CONFIG" <nixos-config>}' \
324324
"$out/configuration.nix"
325325
'' +
326326
optionalString

0 commit comments

Comments
 (0)