mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
fcccfb9e48
This module has a lot of options, so it's a good candidate for freeform settings.
30 lines
645 B
Nix
30 lines
645 B
Nix
import ../make-test-python.nix ({ ... }:
|
|
|
|
{
|
|
name = "pam-u2f";
|
|
|
|
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'
|
|
)
|
|
'';
|
|
})
|