yubikey: New module

This commit is contained in:
PapaTutuWawa committed 2023-07-19 16:23:10 +02:00
1 parent e429bdb946
commit 6699d5488a
3 files changed
+44 -4

No files matched your search

+1
View File
@@ -36,6 +36,7 @@
./services/greetd
./services/cups
./services/logiops
./services/yubikey
# User
#./users/default.nix
+31
View File
@@ -0,0 +1,31 @@
{ lib, config, pkgs, ...}:
let
cfg = config.ptw.services.yubikey;
in {
options.ptw.services.yubikey = {
enable = lib.mkEnableOption "Enable everything for using a YubiKey";
};
config = lib.mkIf cfg.enable {
services = {
# Unprivileged access to the YubiKey
udev.packages = [ pkgs.yubikey-personalization ];
# Allow using the YubiKey as a smart card
pcscd.enable = true;
};
environment.systemPackages = with pkgs; [
# Management
yubikey-manager-qt yubikey-manager yubico-piv-tool
];
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
};
}