diff --git a/gpg/pubkey_nitrokey.asc b/gpg/pubkey_nitrokey.asc new file mode 100644 index 0000000..70296d4 --- /dev/null +++ b/gpg/pubkey_nitrokey.asc @@ -0,0 +1,74 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF5AoWEBEAC5Hkcg9dQvIc+kUR33WYGUe2fMDi7X5ZlUOavAQ4BZpOSO0ewt +b/x7Oc3stVvfWjkPhiOeCBmdpzcNDI6Ep1Pn7pcLVYlQ1o6imB0YvzdIDCGxQFZp +toQNj2iKcFPEoA5LKVTXzKlahbrNrL99DQ/m8R4Y9Xjhw/jSS4L5hCAdLfFHmSEk +9gkUHlUNA0udeeXHQykJzAPYXaRjzXm3h3dVerRmOaDDYfhwyozyT0cnlEOG5011 +B03+qO/jlzqqJBkPRpy+ingVo7LQE4zkw0I3yQi6/IJNtFmEzXP1E381vyKuAJtf +P8SF+KNtYjJwPBVVcFfXAbyRab91F+QO8Rd31TOF/xPP0w8L5qFMqxhOsrs8xwOr +YhVn/xV9KjKFRI6gsmr7QKRt4ISyJXCKASN/GsOUe3ed36EhXxVGk7dzb7b05A1s +Xfpa37pKgA1AEjE5hxCCuMkQfjW8FvEosrJ+bSYTK9gdHcPo4SjYqjoBfW1rrhNG +3r7HbHg6ZTZkeN67udXdmGNomhHvUQbPCZQ48fZoVTHglOx0ucQ7qcnFGU0AItWj +qu7OH9fsQyHy0nXbddJyYmOsSBhMhzAHOT+VzWIOawmpKc2fgP9jQjwfovvADaxc +BGTUU+nFviDcMBDtKRswME8vj+8sbVsaDfHZvTOuD61OGIVzJiLFWJSSqwARAQAB +tCVEYW5pZWwgTGFuZ2JlaW4gPGRhbmllbEBzeXN0ZW1saS5vcmc+iQJOBBMBCgA4 +FiEElPPT3awigCJY/ARLbEfHU/CCMAIFAl5AoWECGwMFCwkIBwMFFQoJCAsFFgID +AQACHgECF4AACgkQbEfHU/CCMALcNhAAif0ulNF9Iv4CnrwSncnvWsP8qv9ZR+dN +GKkmhRVHiuF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A4RU5F3TqZIOdm +yG+2ol7Csn5shpvY+kNHeDe0v0vfpkhMOxHOQKvO5ApwKvAc3KuQaHbnCudY7fU0 +T+wqTAJEARz4KI8+ncYRBl7hUuiiR3sT/Q11mvl79Cldly8JJ1jRrXZVQzS2Y2S6 +tXVBxNckuyVTw7oR1jyq9pv5oVArBbxnNTuMhoptVrDqh2ifkMWHwqqVGy07YKy/ +qKYRlU2YOkdGz91RPcABf5uip+q6fqO1JAT8ddi0O9xuIUhvzKcOx2sxIVrGuejx +XvsYEEf0HuHQ1mcOgWZLUYjt2UwClz9LRX/5pmPb2CUyf4Nt2PNgpNSk6jMAsw9c +HOIRJevfUeTtJUGLzI5+40eR0a6ZYovb5L1SzR9EZjMKIdQvz7wQdPes +=McwK +-----END PGP PUBLIC KEY BLOCK----- diff --git a/yodaTab/home-manager.nix b/yodaTab/home-manager.nix index b6d5cf0..4c2ab81 100644 --- a/yodaTab/home-manager.nix +++ b/yodaTab/home-manager.nix @@ -7,7 +7,8 @@ in imports = [ (import "${home-manager}/nixos") ./git.home.nix - ./nitrokey-ssh-gpg.home.nix + # TODO + #./nitrokey-ssh-gpg.home.nix ]; /* Enable home-manager to configure GNOME */ diff --git a/yodaTab/nitrokey-ssh-gpg.nix b/yodaTab/nitrokey-ssh-gpg.nix index c9e5f48..4c09e2a 100644 --- a/yodaTab/nitrokey-ssh-gpg.nix +++ b/yodaTab/nitrokey-ssh-gpg.nix @@ -16,10 +16,27 @@ # Restart gpg-agent after config change. # Otherwise there might be a gpg error about "no pinentry". # https://discourse.nixos.org/t/cant-get-gnupg-to-work-no-pinentry/15373/19 - # + # Not sure if this is needed: Reload udev rules. # sudo -- udevadm control --reload-rules && udevadm trigger # + # Not sure if this is needed: + # killall gpg-agent + + # TODO: gpg-agent pinentry problem + # https://github.com/NixOS/nixpkgs/issues/97861 + # + # gpgconf --check-programs + #=> gpgconf: error running '/nix/store/lvsbmqy4dmlri22145hbr6799hgbnpnf-gnupg-2.4.0/bin/pinentry': probably not installed + # + # ssh -v nas + #=> OpenSSH_9.3p2, OpenSSL 3.0.10 1 Aug 2023 + #=> debug1: Reading configuration data /home/yoda/.ssh/config + #=> debug1: /home/yoda/.ssh/config line 67: Applying options for nas + #=> debug1: /home/yoda/.ssh/config line 180: Applying options for * + #=> debug1: Reading configuration data /etc/ssh/ssh_config + #=> debug1: Executing command: '/nix/store/8fv91097mbh5049i9rglc73dx6kjg3qk-bash-5.2-p15/bin/bash -c '/nix/store/lvsbmqy4dmlri22145hbr6799hgbnpnf-gnupg-2.4.0/bin/gpg-connect-agent --quiet updatestartuptty /bye >/dev/null 2>&1'' + services.udev.packages = [ pkgs.nitrokey-udev-rules ]; programs = { ssh.startAgent = false; @@ -27,8 +44,19 @@ enable = true; # ... Also sets SSH_AUTH_SOCK environment variable correctly. enableSSHSupport = true; + pinentryFlavor = "curses"; }; }; + + users.users.yoda = { + packages = with pkgs; [ + pinentry-curses + ]; + }; + environment.systemPackages = with pkgs; [ + pinentry-curses + ]; + # Smartcard daemon. services.pcscd.enable = true; }