This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tpm2: use ssh-tpm-agent

+22 -2
+22 -2
2configs/tpm2.nix
··· 1 - { pkgs, ... }: { 1 + { pkgs, lib, ... }: 2 + let 3 + pinentry-askpass = pkgs.writeShellScriptBin "pinentry-askpass" '' 4 + # Use pinentry with auto-detection (graphical if available, curses fallback) 5 + result=$(cat <<EOF | ${pkgs.pinentry-all}/bin/pinentry 6 + SETDESC $1 7 + SETPROMPT Passphrase: 8 + GETPIN 9 + EOF 10 + ) 11 + echo "$result" | grep '^D ' | cut -d' ' -f2- 12 + ''; 13 + in 14 + { 2 15 security.tpm2 = { 3 16 enable = true; 4 17 pkcs11.enable = true; 5 18 abrmd.enable = true; 6 19 }; 7 20 environment.systemPackages = [ 8 - pkgs.tpm2-tools 21 + pkgs.ssh-tpm-agent 22 + pkgs.keyutils 23 + pinentry-askpass 9 24 ]; 25 + environment.variables = { 26 + SSH_ASKPASS = lib.mkForce "/run/current-system/sw/bin/pinentry-askpass"; 27 + SSH_ASKPASS_REQUIRE = "force"; 28 + }; 29 + users.users.mainUser.extraGroups = [ "tss" ]; 10 30 }