refactor nixos
This commit is contained in:
parent
064c099b16
commit
186ace4edd
14 changed files with 175 additions and 290 deletions
24
nixos/common/optional/key.nix
Normal file
24
nixos/common/optional/key.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Configure your YubiKey via the command line
|
||||
yubikey-manager
|
||||
# Enables files to be encrypted to age identities stored on YubiKeys
|
||||
age-plugin-yubikey
|
||||
];
|
||||
|
||||
# GPG and SSH support
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Use our yubikey as a user login or for sudo access
|
||||
security.pam.services = {
|
||||
login.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue