forked from Mirrors/nixos-infect
SC2068: Double quote array expansions to avoid re-splitting elements.
This commit is contained in:
parent
673c70f45c
commit
ff398f6447
1 changed files with 6 additions and 6 deletions
12
nixos-infect
12
nixos-infect
|
@ -21,7 +21,7 @@ makeConf() {
|
||||||
networking.hostName = "$(hostname)";
|
networking.hostName = "$(hostname)";
|
||||||
networking.firewall.allowPing = true;
|
networking.firewall.allowPing = true;
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
users.users.root.openssh.authorizedKeys.keys = [$(for key in ${keys[@]}; do echo -n "
|
users.users.root.openssh.authorizedKeys.keys = [$(for key in "${keys[@]}"; do echo -n "
|
||||||
\"$key\""; done)
|
\"$key\""; done)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,10 @@ EOF
|
||||||
gateway6=($(ip -6 route show dev $eth1_name | grep default | sed -r 's|default via ([0-9a-f:]+).*|\1|' || true))
|
gateway6=($(ip -6 route show dev $eth1_name | grep default | sed -r 's|default via ([0-9a-f:]+).*|\1|' || true))
|
||||||
interfaces1=<< EOF
|
interfaces1=<< EOF
|
||||||
$eth1_name = {
|
$eth1_name = {
|
||||||
ip4 = [$(for a in ${eth1_ip4s[@]}; do echo -n "
|
ip4 = [$(for a in "${eth1_ip4s[@]}"; do echo -n "
|
||||||
$a"; done)
|
$a"; done)
|
||||||
];
|
];
|
||||||
ip6 = [$(for a in ${eth1_ip6s[@]}; do echo -n "
|
ip6 = [$(for a in "${eth1_ip6s[@]}"; do echo -n "
|
||||||
$a"; done)
|
$a"; done)
|
||||||
];
|
];
|
||||||
EOF
|
EOF
|
||||||
|
@ -72,17 +72,17 @@ EOF
|
||||||
# This file was populated at runtime with the networking
|
# This file was populated at runtime with the networking
|
||||||
# details gathered from the active system.
|
# details gathered from the active system.
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [$(for a in ${nameservers[@]}; do echo -n "
|
nameservers = [$(for a in "${nameservers[@]}"; do echo -n "
|
||||||
\"$a\""; done)
|
\"$a\""; done)
|
||||||
];
|
];
|
||||||
defaultGateway = "${gateway}";
|
defaultGateway = "${gateway}";
|
||||||
defaultGateway6 = "${gateway6}";
|
defaultGateway6 = "${gateway6}";
|
||||||
interfaces = {
|
interfaces = {
|
||||||
$eth0_name = {
|
$eth0_name = {
|
||||||
ip4 = [$(for a in ${eth0_ip4s[@]}; do echo -n "
|
ip4 = [$(for a in "${eth0_ip4s[@]}"; do echo -n "
|
||||||
$a"; done)
|
$a"; done)
|
||||||
];
|
];
|
||||||
ip6 = [$(for a in ${eth0_ip6s[@]}; do echo -n "
|
ip6 = [$(for a in "${eth0_ip6s[@]}"; do echo -n "
|
||||||
$a"; done)
|
$a"; done)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue