1
0
mirror of https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git synced 2025-09-15 09:45:58 +03:00
Files
xnm 33aa287e12 🔒 feat(security): replace sudo with sudo-rs
- Enable `sudo-rs` with wheel-only execution
- Disable legacy `sudo`
- Update AppArmor and U2F configs for `sudo-rs`
- Update Yubikey U2F auth for `sudo-rs`
2025-05-18 03:40:44 +03:00

25 lines
523 B
Nix

{ pkgs, ...}:
{
services.udev.packages = [ pkgs.yubikey-personalization ];
programs.ssh.startAgent = true;
# FIXME Don't forget to create an authorization mapping file for your user (https://nixos.wiki/wiki/Yubikey#pam_u2f)
security.pam.u2f = {
enable = true;
settings.cue = true;
control = "sufficient";
};
security.pam.services = {
greetd.u2fAuth = true;
sudo-rs.u2fAuth = true;
hyprlock.u2fAuth = true;
};
environment.systemPackages = with pkgs; [
yubikey-manager
];
}