about summary refs log tree commit diff
path: root/nixos/modules/services/networking/cjdns-hosts.sh
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-10-25 20:56:54 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-10-27 14:15:54 +0200
commit8180922d236c53b5e09cfe1b63f6c12977bb2803 (patch)
tree25ef9efe35719e555df74d2c95a17bbe8f4745d9 /nixos/modules/services/networking/cjdns-hosts.sh
parent9654e09b5a4bd44ecf16f8c435afa834a76ef2b1 (diff)
downloadnixlib-8180922d236c53b5e09cfe1b63f6c12977bb2803.tar
nixlib-8180922d236c53b5e09cfe1b63f6c12977bb2803.tar.gz
nixlib-8180922d236c53b5e09cfe1b63f6c12977bb2803.tar.bz2
nixlib-8180922d236c53b5e09cfe1b63f6c12977bb2803.tar.lz
nixlib-8180922d236c53b5e09cfe1b63f6c12977bb2803.tar.xz
nixlib-8180922d236c53b5e09cfe1b63f6c12977bb2803.tar.zst
nixlib-8180922d236c53b5e09cfe1b63f6c12977bb2803.zip
cjdns service: refactor cjdns hosts builder
The old version would export two lists to a bash builder and do pairwise
processing on the bash side.  In the new version we instead generate a
logic free builder on the Nix side. This is not only conceptually
simpler but reduces the amount of code and intermediate values.
Diffstat (limited to 'nixos/modules/services/networking/cjdns-hosts.sh')
-rw-r--r--nixos/modules/services/networking/cjdns-hosts.sh11
1 files changed, 0 insertions, 11 deletions
diff --git a/nixos/modules/services/networking/cjdns-hosts.sh b/nixos/modules/services/networking/cjdns-hosts.sh
deleted file mode 100644
index 8a2b47e52143..000000000000
--- a/nixos/modules/services/networking/cjdns-hosts.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-pubs=($pubs)
-hosts=($hosts)
-
-lines="''\n"
-for ((i = 0; i < ${#pubs[*]}; i++)); do
-    addr=$($cjdns/bin/publictoip6 ${pubs[i]})
-    lines="${lines}$addr ${hosts[i]}\n"
-done
-lines="${lines}''"
-
-echo -ne $lines > $out