mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
ssh-agent: make key timeout optional
This commit is contained in:
parent
d70336f37c
commit
d57110fabc
1 changed files with 5 additions and 2 deletions
|
@ -63,7 +63,7 @@ in
|
|||
type = types.string;
|
||||
default = "1h";
|
||||
description = ''
|
||||
How long to keep the private keys in memory.
|
||||
How long to keep the private keys in memory. Use null to keep them forever.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -107,7 +107,10 @@ in
|
|||
wantedBy = [ "default.target" ];
|
||||
serviceConfig =
|
||||
{ ExecStartPre = "${pkgs.coreutils}/bin/rm -f %t/ssh-agent";
|
||||
ExecStart = "${cfg.package}/bin/ssh-agent -t ${cfg.agentTimeout} -a %t/ssh-agent";
|
||||
ExecStart =
|
||||
"${cfg.package}/bin/ssh-agent " +
|
||||
optionalString (cfg.agentTimeout != null) ("-t ${cfg.agentTimeout} ") +
|
||||
"-a %t/ssh-agent";
|
||||
StandardOutput = "null";
|
||||
Type = "forking";
|
||||
Restart = "on-failure";
|
||||
|
|
Loading…
Reference in a new issue