nixpkgs/nixos/tests/pam/pam-u2f.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
645 B
Nix
Raw Normal View History

import ../make-test-python.nix ({ ... }:
{
name = "pam-u2f";
2022-03-20 23:15:30 +00:00
nodes.machine =
{ ... }:
{
security.pam.u2f = {
enable = true;
control = "required";
settings = {
cue = true;
debug = true;
interactive = true;
origin = "nixos-test";
# Freeform option
userpresence = 1;
};
};
};
testScript =
''
machine.wait_for_unit("multi-user.target")
machine.succeed(
'egrep "auth required .*/lib/security/pam_u2f.so.*cue.*debug.*interactive.*origin=nixos-test.*userpresence=1" /etc/pam.d/ -R'
)
'';
})