You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
350 B
10 lines
350 B
{ pkgs, ... }:
|
|
|
|
let
|
|
ssh = "${pkgs.openssh}/bin/ssh";
|
|
gpg-connect-agent = "${pkgs.gnupg}/bin/gpg-connect-agent";
|
|
in
|
|
{
|
|
isUnlocked = "${pkgs.procps}/bin/pgrep 'gpg-agent' &> /dev/null && ${gpg-connect-agent} 'scd getinfo card_list' /bye | ${pkgs.gnugrep}/bin/grep SERIALNO -q";
|
|
unlock = "${ssh} -T localhost -o StrictHostKeyChecking=no exit";
|
|
}
|
|
|