nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchFromGitHub,
3 lib,
4 stdenvNoCC,
5}:
6
7stdenvNoCC.mkDerivation rec {
8 pname = "ssh-agents";
9 version = "1.0.1";
10
11 src = fetchFromGitHub {
12 owner = "kalbasit";
13 repo = "ssh-agents";
14 rev = "v${version}";
15 sha256 = "1l09zy87033v7hd17lhkxikwikqz5nj9x6c2w80rqpad4lp9ihwz";
16 };
17
18 installFlags = [ "PREFIX=$(out)" ];
19
20 meta = {
21 description = "Spawn and maintain multiple ssh-agents across terminals";
22 longDescription = ''
23 The SSH agent is usually spawned by running eval $(ssh-agent), however this
24 spawns a new SSH agent at every invocation. This project provides an
25 ssh-agent wrapper called ssh-agents that is capable of spawning an SSH
26 agent and caching the environment variables for later invocation.
27
28 Features
29 - One SSH agent across all terminals
30 - Add all un-encrypted SSH keys to the agent upon spawning. Please note
31 that encrypted SSH keys can only be added via ssh-add after having
32 started the agent.
33 - Ability to have different keys in different agents for security purposes.
34 - Multiple SSH agents
35 - To use multi-SSH agents, start ssh agent with the --name flag. The
36 given name is expected to be a folder under ~/.ssh/name containing the
37 keys to include in the agent.
38 '';
39 homepage = "https://github.com/kalbasit/ssh-agents";
40 license = lib.licenses.mit;
41 maintainers = with lib.maintainers; [ kalbasit ];
42 platforms = lib.platforms.unix;
43 mainProgram = "ssh-agents";
44 };
45}