🚀 enable ssh support for yubikey

nixos
Moritz Böhme 2022-04-20 17:38:49 +02:00
parent fcc03ca88c
commit 64891e10cb
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
2 changed files with 9 additions and 3 deletions

View File

@ -2,6 +2,11 @@
{
services.udev.packages = [ pkgs.yubikey-personalization ];
environment.shellInit = ''
export GPG_TTY="$(tty)"
gpg-connect-agent /bye
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
'';
home-manager.users.moritz.home.packages = with pkgs; [
# cli
yubikey-manager

View File

@ -1,10 +1,11 @@
{ config, lib, pkgs, ... }:
{
home-manager.users.moritz = {
services.gpg-agent = {
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
defaultCacheTtl = 3600;
enableSSHSupport = true;
};
};
services.pcscd.enable = true;