mirror of
https://github.com/nix-community/home-manager
synced 2024-12-05 01:19:46 +01:00
d8f9dcfbd3
Write YubiKey token IDs in the format yubico_pam expects. See https://developers.yubico.com/yubico-pam/ for details. Also refer to the NixOS option security.pam.services.<name>.yubicoAuth. Closes #2502
15 lines
387 B
Nix
15 lines
387 B
Nix
{
|
|
config = {
|
|
pam.yubico.authorizedYubiKeys.ids = [ "abcdefghijkl" "012345678912" ];
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.yubico/authorized_yubikeys
|
|
assertFileContent \
|
|
home-files/.yubico/authorized_yubikeys \
|
|
${
|
|
builtins.toFile "yubico-with-ids-expected.txt"
|
|
"hm-user:abcdefghijkl:012345678912"
|
|
}
|
|
'';
|
|
};
|
|
}
|