summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-01-31 16:45:55 -0500
committerBen Sima <ben@bsima.me>2022-01-31 16:45:55 -0500
commite18ad25efd2768e597aaa9f94071ed47cb65803f (patch)
tree49acc2974cdfde65d35328563134ce12cb0369b3 /lib
parenta3be270668ae5780f3ef0437b088870ebbf8e011 (diff)
yubikey login on helium
This allows me to login and sudo with *either* a password or my yubikey. I also had to setup my yubikey with the instructions here: https://nixos.wiki/wiki/Yubikey#Logging-in Basically use ykman and ykpamcfg to generate a challenge-response setup on slot 2 of my yubikey. The pam config compares the key response with the ~/.yubico/challenge-* file in order to authenticate. I think pam uses the ~/.yubico/authorized_keys file to know to which yubikey to send the challenge, but I'm not sure on that one.
Diffstat (limited to 'lib')
-rw-r--r--lib/authorized_yubikeys1
-rw-r--r--lib/common.nix4
-rw-r--r--lib/linux.nix1
3 files changed, 6 insertions, 0 deletions
diff --git a/lib/authorized_yubikeys b/lib/authorized_yubikeys
new file mode 100644
index 0000000..9e4c5a6
--- /dev/null
+++ b/lib/authorized_yubikeys
@@ -0,0 +1 @@
+ben:cccccchklur
diff --git a/lib/common.nix b/lib/common.nix
index c977cdb..0fa9302 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -32,6 +32,10 @@ in
keyboard.options = [ "caps:ctrl_modifier" ];
file = {
+ yubikeys = {
+ source = ./authorized_yubikeys;
+ target = ".yubico/authorized_yubikeys";
+ };
editorconfig = {
source = ./editorconfig;
target = ".editorconfig";
diff --git a/lib/linux.nix b/lib/linux.nix
index c98124f..912e8bc 100644
--- a/lib/linux.nix
+++ b/lib/linux.nix
@@ -135,6 +135,7 @@ in
xterm
yank
youtube-dl
+ yubioath-desktop
zathura
# languages i regularly use