diff options
Diffstat (limited to 'cac')
-rwxr-xr-x | cac | 49 |
1 files changed, 0 insertions, 49 deletions
@@ -232,34 +232,6 @@ __cac_cli__powerop() {( _cac_handle_reply 'cac powerop' "$reply" )} -#? cac pushconfig SERVERSPEC [PREFIX=/] -#? -__cac_cli__pushconfig() {( - server=$(__cac_cli__getserver "$1") - - prefix=${2-/} - - hostname=$(echo $server | jq -r .label) - - address=$(echo $server | jq -r .ip) - target=root@$address - - RSYNC_RSH='sshpass -e ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' - SSHPASS=$(echo $server | jq -r .rootpass) - export RSYNC_RSH SSHPASS - - pushgit . $target:$prefix/etc/nixos/ - pushgit hosts $target:$prefix/etc/nixos/hosts/ - pushgit tmp/nixpkgs/$hostname $target:$prefix/etc/nixos/nixpkgs/ - pushdir secrets/$hostname/nix $target:$prefix/etc/nixos/secrets/ - pushdir secrets/$hostname/rsync $target:$prefix/ - echo "_:{imports=[./modules/$hostname];}" \ - | $RSYNC_RSH "$target" tee "$prefix/etc/nixos/configuration.nix" \ - > /dev/null - - ## TODO chmod and chown secrets -)} - #? cac setlabel SERVERSPEC LABEL #? __cac_cli__setlabel() {( @@ -436,27 +408,6 @@ rsyncfiles() {( )} -# gitfiles : git-work-tree -> lines filename -gitfiles() { - git -C "$1" archive --format=tar HEAD | tar t | sed '/\/$/d' -} - -# pushgit : git-work-tree x rsync-target -> ? -pushgit() { - gitfiles "$1" | rsyncfiles "$1" "$2" -} - -# dirfiles : local-dir -> lines filename -dirfiles() {( - cd "$1" - find . -type f | sed 's/^\.\///' -)} - -# pushdir : local-dir x rsync-target -> ? -pushdir() { - dirfiles "$1" | rsyncfiles "$1" "$2" -} - _cac_handle_reply() {( |