executable_ssh-vm 380 B

123456
  1. #!/usr/bin/env bash
  2. cd "${HOME}/src/gitlab.intr/nixos/vm" || return 1
  3. hostname="$(nix-instantiate --eval -E "(builtins.head (builtins.getFlake (toString ./.)).nixosConfigurations.${1}.config.networking.interfaces.ens3.ipv4.addresses).address")"
  4. eval command ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l sup -i "${HOME}/.ssh/id_rsa_sup" "$hostname" "${@:2}"