l baseX: add yubikey config
This commit is contained in:
parent
cae3d30b60
commit
bea093f375
lass/2configs
|
@ -10,6 +10,7 @@ in {
|
|||
./copyq.nix
|
||||
./urxvt.nix
|
||||
./xdg-open.nix
|
||||
./yubikey.nix
|
||||
{
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
|
@ -54,7 +55,7 @@ in {
|
|||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
programs.ssh.agentTimeout = "10m";
|
||||
programs.ssh.startAgent = true;
|
||||
programs.ssh.startAgent = false;
|
||||
services.openssh.forwardX11 = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
25
lass/2configs/yubikey.nix
Normal file
25
lass/2configs/yubikey.nix
Normal file
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue