summaryrefslogtreecommitdiff
path: root/config/yubikey.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/yubikey.nix')
-rw-r--r--config/yubikey.nix51
1 files changed, 0 insertions, 51 deletions
diff --git a/config/yubikey.nix b/config/yubikey.nix
deleted file mode 100644
index d10bb57..0000000
--- a/config/yubikey.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
- yubikey-pkgs = with pkgs; [
- ccid
- libu2f-host
- libusb
- rng_tools
- yubikey-manager
- yubikey-personalization
- gnupg
- pinentry
- ];
-in
-{
- services.pcscd.enable = true;
- services.udev.packages = with pkgs; [
- libu2f-host
- yubikey-personalization
- ];
- services.gnome3.gnome-keyring.enable = lib.mkForce false;
-
- programs.gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
- # Use GPG agent instead.
- programs.ssh.startAgent = lib.mkDefault false;
-
- environment = {
- systemPackages = yubikey-pkgs;
- };
-
- security.sudo.extraRules = [
- {
- groups = [ "wheel" ];
- commands = [ { command = "${pkgs.systemd}/bin/systemctl restart pcscd"; options = [ "NOPASSWD" ]; } ];
- }
- ];
-
- systemd.user.services.restart-pcscd = {
- description = "Redshift colour temperature adjuster";
- wantedBy = [ "graphical-session.target" ];
- partOf = [ "graphical-session.target" ];
- serviceConfig = {
- ExecStart = ''
- sudo systemctl restart pcscd
- '';
- Type = "oneshot";
- };
- };
-}