mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-01-18 09:53:06 +01:00
feat: update yubikey configuration
This commit is contained in:
parent
d06c14e32d
commit
27829eb0fc
1 changed files with 14 additions and 2 deletions
|
@ -17,6 +17,7 @@ in
|
|||
example = [ "123456" "1234567" ];
|
||||
description = "Register additional Yubikey IDs.";
|
||||
};
|
||||
enable-agent = mkEnableOption "Enable the Yubikey agent";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -34,5 +35,16 @@ in
|
|||
login.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
};
|
||||
|
||||
services.yubikey-agent.enable = cfg.enable-agent;
|
||||
|
||||
programs.ssh.extraConfig = mkIf cfg.enable-agent ''
|
||||
Host *
|
||||
IdentityAgent /usr/local/var/run/yubikey-agent.sock
|
||||
'';
|
||||
|
||||
environment.sessionVariables = mkIf cfg.enable-agent {
|
||||
SSH_AUTH_SOCK = "/usr/local/var/run/yubikey-agent.sock";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue