From 182aa5ecdc5c6583ce9b44c5a13432bb30409fc8 Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 5 Jun 2025 03:41:32 +0200 Subject: Setup login and sudo authentication through U2F w/ YubiKey Signed-off-by: Mel --- modules/home/common.nix | 1 + modules/home/yubikeys.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 modules/home/yubikeys.nix (limited to 'modules/home') diff --git a/modules/home/common.nix b/modules/home/common.nix index e2b57f7..cdf8c1c 100644 --- a/modules/home/common.nix +++ b/modules/home/common.nix @@ -5,6 +5,7 @@ ../foundation/home ./shell.nix + ./yubikeys.nix ./code.nix ./zed.nix ]; diff --git a/modules/home/yubikeys.nix b/modules/home/yubikeys.nix new file mode 100644 index 0000000..266ce9d --- /dev/null +++ b/modules/home/yubikeys.nix @@ -0,0 +1,17 @@ +{ ... }: + +let + keys = [ + # username of YubiKey owner (me! :3) + "mel" + # "carnal" YubiKey + "7dYKqa9yw69hXwmYd61Bw0hnnxbSsASieIBmokmbAHArJexkPz+TGRVdXW2U8QiLAoe9l1QKo3jrtQxxbBiuFQ==,N7bABlRz0DvIqwxgBnTiyNZ4/JnRIRUEhVk+95h7+KtbTYdnoGnSaqiiimGQxTWxOHfpHbuii127f0HUwYPmXw==,es256,+presence" + # "anatomy" YubiKey + "//CLbB23LlMtMwefGzrMVELgTkIcfMRSjxJlQDvQ3FKRrlyPA75rosYVl5tqQbkPyed0fwsAkr1vhqPtth4GMQ==,VwxKl0ZYDmCTU02ziMigG1ZVC1MXDH9qeuBT1qplw1pt++tV32xao/yHayiRc2hvbJdJjfplQxT7mLnW90u9WQ==,es256,+presence" + ]; +in +{ + xdg.configFile = { + "Yubico/u2f_keys".text = builtins.concatStringsSep ":" keys; + }; +} -- cgit 1.4.1