-
-
Save betaboon/0e8ec16fc6a3c35331239fd43ea8a821 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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