git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #71139 from philandstuff/ssh-agent-pkcs11-whitelist

ssh-agent: add agentPKCS11Whitelist option

commitdb502b034f4293ad66bef7136a401a2092a679ba authorRobin Gloster <mail@glob.in> dateMon 4 Nov 2019, 22:16 (7 years ago) parentfa7d7eb8120184
1 file changed+11
nixos/modules/programs/ssh.nix+11
nixos/modules/programs/ssh.nix+11
@@ -115,6 +115,16 @@ in
115115 '';
116116 };
117117
118+ agentPKCS11Whitelist = mkOption {
119+ type = types.nullOr types.str;
120+ default = null;
121+ example = "\${pkgs.opensc}/lib/opensc-pkcs11.so";
122+ description = ''
123+ A pattern-list of acceptable paths for PKCS#11 shared libraries
124+ that may be used with the -s option to ssh-add.
125+ '';
126+ };
127+
118128 package = mkOption {
119129 type = types.package;
120130 default = pkgs.openssh;
@@ -241,6 +251,7 @@ in
241251 ExecStart =
242252 "${cfg.package}/bin/ssh-agent " +
243253 optionalString (cfg.agentTimeout != null) ("-t ${cfg.agentTimeout} ") +
254+ optionalString (cfg.agentPKCS11Whitelist != null) ("-P ${cfg.agentPKCS11Whitelist} ")
244255 "-a %t/ssh-agent";
245256 StandardOutput = "null";
246257 Type = "forking";