title: nixops: how to use local ssh key when deploying on machine with existing nixos (targetEnv is none)?
body: <p>I have machine with nixos (provisioned using terraform, <a href="https://github.com/srghma/nixos-terraform-example/blob/f58934308d1d7654d73672c12197c5f8b53408da/network.tf#L1" rel="noreferrer">config</a>), I want to connect to it using <a href="https://github.com/srghma/nixos-terraform-example/blob/f58934308d1d7654d73672c12197c5f8b53408da/network.nix#L5" rel="noreferrer"><code>deployment.targetHost = ipAddress</code></a> and <code>deployment.targetEnv = "none"</code></p>
  
  <p>But I can't configure nixops to use <code>/secrets/stage_ssh_key</code> ssh key  </p>
  
  <p>This is not working ( actually this is not documented, I have found it here <a href="https://github.com/NixOS/nixops/blob/d4e5b779def1fc9e7cf124930d0148e6bd670051/nixops/backends/none.py#L33-L35" rel="noreferrer">https://github.com/NixOS/nixops/blob/d4e5b779def1fc9e7cf124930d0148e6bd670051/nixops/backends/none.py#L33-L35</a> )</p>
  
  <pre><code>{
    stage =
      { pkgs, ... }:
      {
        deployment.targetHost = (import ./nixos-generated/stage.nix).terraform.ip;
        deployment.targetEnv = "none";
  
        deployment.none.sshPrivateKey        = builtins.readFile ./secrets/stage_ssh_key;
        deployment.none.sshPublicKey         = builtins.readFile ./secrets/stage_ssh_key.pub;
        deployment.none.sshPublicKeyDeployed = true;
  
        environment.systemPackages = with pkgs; [
          file
        ];
      };
  }
  </code></pre>
  
  <p><code>nixops ssh stage</code> results in asking for password, expected - login without password</p>
  
  <p><code>nixops ssh stage -i ./secrets/stage_ssh_key</code> works as expected, password is not asked</p>
  
  <p>How to reproduce:</p>
  
  <ul>
  <li>download repo</li>
  <li><code>rm -rf secrets/*</code></li>
  <li><p>add aws keys in <code>secrets/aws.nix</code></p>
  
  <p><code>{
    EC2_ACCESS_KEY="XXXX";
    EC2_SECRET_KEY="XXXX";
  }</code></p></li>
  <li><p><code>nix-shell</code></p></li>
  <li><code>make generate_stage_ssh_key</code></li>
  <li><code>terraform apply</code></li>
  <li><code>make nixops_create</code></li>
  <li><code>nixops deploy</code> asks password</li>
  </ul>