28 lines
731 B
Nix
28 lines
731 B
Nix
{ ... }:
|
|
|
|
{
|
|
# Déploie les clés FIDO/U2F autorisées.
|
|
environment.etc."u2f-mappings".source = ../u2f-mappings;
|
|
|
|
# Authentification PAM avec FIDO2/U2F.
|
|
security.pam.u2f = {
|
|
enable = true;
|
|
|
|
# La YubiKey peut remplacer le mot de passe.
|
|
# Si l'authentification U2F échoue ou que l'utilisateur
|
|
# n'a pas de clé enregistrée, PAM peut continuer
|
|
# avec l'authentification classique.
|
|
control = "sufficient";
|
|
|
|
settings = {
|
|
authfile = "/etc/u2f-mappings";
|
|
|
|
# Identifiant volontairement commun à tous nos postes.
|
|
origin = "pam://nixos-workstations";
|
|
appid = "pam://nixos-workstations";
|
|
|
|
# Demande à pam_u2f d'indiquer qu'il attend la clé.
|
|
cue = true;
|
|
};
|
|
};
|
|
} |