diff --git a/lib/zerotier-interface.nix b/lib/zerotier-interface.nix deleted file mode 100644 index 687cca3..0000000 --- a/lib/zerotier-interface.nix +++ /dev/null @@ -1,29 +0,0 @@ -nwid: -{ pkgs, ... }: -let - ztInterfaceScript = pkgs.writeShellScript "zt-interface" '' - #!/usr/bin/env bash - - network="$1" - index=${"2:-0"} - - network="0x$network" - - # zerotier hash function - network=$(( (($network ^ ($network >> (3*8))) + $index ) % (1<<(5*8)) )) - - # encode the result in base32 - while [ $network -gt 0 ]; do - index=$(( $network % (1<<5) + 24 )) - [ $index -lt 50 ] && index=$(( $index + 73 )) - result="$(printf "\\%03o" $index)$result" - network=$(( $network >> 5 )) - done - - echo "zt$(printf %b "$result")" - ''; - result = pkgs.runCommand "zt-interface-output" { } '' - ${ztInterfaceScript} > $out - ''; -in -builtins.readFile result diff --git a/modules/clan/phonebox/default.nix b/modules/clan/phonebox/default.nix index d97328b..078a512 100644 --- a/modules/clan/phonebox/default.nix +++ b/modules/clan/phonebox/default.nix @@ -25,7 +25,6 @@ { lib, config, - pkgs, ... }: let