u2f: import configuration pour activer le support des clefs FIDO / u2f
Notes : - import de conf active sur radx - fonctionne avec Chromium & Github - ne fonctionne pas avec Firefox & Githubnixos-19.09
parent
bb08ab258f
commit
e56040b333
@ -0,0 +1,41 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
annuaire = config.r6d.machines;
|
||||||
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
|
flags = currentMachine.configurationFlags;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
# Ajout du support des yobikey & hyperfido
|
||||||
|
## source des valeurs udev : https://github.com/Yubico/libu2f-host/blob/master/70-u2f.rules
|
||||||
|
|
||||||
|
## source car udev sur nixos semble ancien : https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-old-u2f.rules
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# this udev file should be used with udev older than 188
|
||||||
|
ACTION!="add|change", GOTO="u2f_end"
|
||||||
|
|
||||||
|
# Yubico YubiKey
|
||||||
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", GROUP="plugdev", MODE="0660"
|
||||||
|
|
||||||
|
# Happlink (formerly Plug-Up) Security KEY
|
||||||
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0", GROUP="plugdev", MODE="0660"
|
||||||
|
|
||||||
|
# Neowave Keydo and Keydo AES
|
||||||
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1e0d", ATTRS{idProduct}=="f1d0|f1ae", GROUP="plugdev", MODE="0660"
|
||||||
|
|
||||||
|
# HyperSecu HyperFIDO
|
||||||
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0880", GROUP="plugdev", MODE="0660"
|
||||||
|
|
||||||
|
LABEL="u2f_end"
|
||||||
|
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", GROUP="audio", MODE="0666", SYMLINK+="rtl_sdr"
|
||||||
|
'';
|
||||||
|
|
||||||
|
security.pam.enableU2F = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libu2f-host
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue