refactor nixos

This commit is contained in:
♥ Minnie ♥ 2024-01-21 21:03:57 +08:00
parent 064c099b16
commit 186ace4edd
14 changed files with 175 additions and 290 deletions

View 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;
};
}