Skip to content

Instantly share code, notes, and snippets.

@betaboon
Last active January 4, 2018 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betaboon/0e8ec16fc6a3c35331239fd43ea8a821 to your computer and use it in GitHub Desktop.
Save betaboon/0e8ec16fc6a3c35331239fd43ea8a821 to your computer and use it in GitHub Desktop.
exporting git@github.com:XXX/YYY.git (rev 95014f1) into /nix/store/7sj690xzi2p8xkhrq9w3j0xn845c0852-YYY-95014f1
Initialized empty Git repository in /nix/store/7sj690xzi2p8xkhrq9w3j0xn845c0852-YYY-95014f1/.git/
Failed to add the host to the list of known hosts (/var/empty/.ssh/known_hosts).
no such identity: /home/betaboon/project/ssh/id_rsa: Permission denied
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists
let
stateFilePath = builtins.toPath ./localstate.nixops;
nixpkgsRevision = "a9ffb7b";
pkgsSrc = builtins.fetchTarball { url =
"https://github.com/nixos/nixpkgs-channels" +
"/archive/${nixpkgsRevision}.tar.gz";
};
pkgs = import pkgsSrc;
sshIdentityFile = builtins.toPath ./ssh/id_rsa;
sshConfigFile = pkgs.writeText "ssh_config" ''
Host github.com
IdentityFile ${sshIdentityFile}
StrictHostKeyChecking=no
'';
nixPath = pkgs.lib.concatStringsSep ":" [
pkgs.path
"nixpkgs=${pkgs.path}"
"ssh-config-file=${sshConfigFile}"
];
in pkgs.stdenv.mkDerivation rec {
name = "nixops-env";
buildInputs = with pkgs; [ nixops ];
shellHook = ''
export NIX_PROFILES=
export NIX_PATH=${nixPath}
export NIXOPS_STATE=${stateFilePath}
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment