mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: adds yubikey stuff
This commit is contained in:
parent
3fa04535cf
commit
dbb62c0555
2 changed files with 38 additions and 12 deletions
|
|
@ -1,17 +1,18 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports =
|
||||
[ (import ./bootloader.nix) ]
|
||||
++ [ (import ./hardware.nix) ]
|
||||
++ [ (import ./xserver.nix) ]
|
||||
++ [ (import ./network.nix) ]
|
||||
++ [ (import ./pipewire.nix) ]
|
||||
++ [ (import ./program.nix) ]
|
||||
++ [ (import ./security.nix) ]
|
||||
++ [ (import ./services.nix) ]
|
||||
++ [ (import ./system.nix) ]
|
||||
++ [ (import ./user.nix) ]
|
||||
++ [ (import ./bluetooth.nix) ]
|
||||
++ [ (import ./wayland.nix) ];
|
||||
[(import ./bootloader.nix)]
|
||||
++ [(import ./hardware.nix)]
|
||||
++ [(import ./xserver.nix)]
|
||||
++ [(import ./network.nix)]
|
||||
++ [(import ./pipewire.nix)]
|
||||
++ [(import ./program.nix)]
|
||||
++ [(import ./security.nix)]
|
||||
++ [(import ./services.nix)]
|
||||
++ [(import ./system.nix)]
|
||||
++ [(import ./user.nix)]
|
||||
++ [(import ./bluetooth.nix)]
|
||||
++ [(import ./yubikey.nix)]
|
||||
++ [(import ./wayland.nix)];
|
||||
# ++ [ (import ./virtualization.nix) ];
|
||||
}
|
||||
|
|
|
|||
25
modules/core/yubikey.nix
Normal file
25
modules/core/yubikey.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ...}:
|
||||
|
||||
{
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
||||
# 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;
|
||||
cue = true;
|
||||
control = "sufficient";
|
||||
};
|
||||
|
||||
services = {
|
||||
login.u2fAuth = true;
|
||||
greetd.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
hyprlock.u2fAuth = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-manager
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue