diff options
Diffstat (limited to 'Biz/Ide/push.sh')
-rwxr-xr-x | Biz/Ide/push.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Biz/Ide/push.sh b/Biz/Ide/push.sh index 6729c2f..43dff28 100755 --- a/Biz/Ide/push.sh +++ b/Biz/Ide/push.sh @@ -10,10 +10,11 @@ else target="$prefix.$1" fi what=$(realpath "${CODEROOT:?}/_/nix/$target") -# hack: get the domain from the activation script. there does not seem -# to be a way to get it from nix-instantiate -where=$(rg -r '$2' -e '(domainname ")(.*)(")' "$what/activate") -nix copy --to ssh://root@"$where" "$what" -ssh root@"$where" "$what"/bin/switch-to-configuration switch -ssh root@"$where" nix-env --profile /nix/var/nix/profiles/system --set "$what" +# hack: get the domain from the systemd service. there does not seem to be a way +# to get it from nix-instantiate. (or, maybe i should put this in bild --plan?) +where=$(rg --only-matching --replace '$2' --regexp '(domainname ")(.*)(")' \ + "$what/etc/systemd/system/domainname.service") +nix copy --to ssh://"$USER"@"$where" "$what" +ssh "$USER"@"$where" sudo "$what"/bin/switch-to-configuration switch +ssh "$USER"@"$where" sudo nix-env --profile /nix/var/nix/profiles/system --set "$what" echo "${GRN}good: push: $target${NC}" |