summaryrefslogtreecommitdiffstats
path: root/lass/2configs/yubikey.nix
diff options
context:
space:
mode:
authorlassulus <lass@xerxes.r>2019-10-14 15:11:43 +0200
committerlassulus <lass@xerxes.r>2019-10-14 15:11:43 +0200
commitbea093f375c3782120955e3a8485f269243cd716 (patch)
tree024dddec4a936c13de91203ce6b583cca8542e21 /lass/2configs/yubikey.nix
parentcae3d30b607abbf7213e2a0beb477b7c46614677 (diff)
l baseX: add yubikey config
Diffstat (limited to 'lass/2configs/yubikey.nix')
-rw-r--r--lass/2configs/yubikey.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/lass/2configs/yubikey.nix b/lass/2configs/yubikey.nix
new file mode 100644
index 000000000..e6482c58c
--- /dev/null
+++ b/lass/2configs/yubikey.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+{
+ environment.systemPackages = with pkgs; [
+ yubikey-personalization
+ ];
+
+ services.udev.packages = with pkgs; [ yubikey-personalization ];
+ services.pcscd.enable = true;
+
+ environment.shellInit = ''
+ if [ "$UID" -eq 1337 ]; then
+ export GPG_TTY="$(tty)"
+ gpg-connect-agent /bye
+ export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
+ fi
+ '';
+
+ programs = {
+ ssh.startAgent = false;
+ gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ };
+ };
+}