nixos/security.pam: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-28 21:18:53 +02:00 committed by Jörg Thalheim
parent c99cbe65c4
commit b0d554537c

View File

@ -1,32 +1,28 @@
# This module provides configuration for the OATH PAM modules. # This module provides configuration for the OATH PAM modules.
{ lib, ... }: { lib, ... }:
with lib;
{ {
options = { options = {
security.pam.oath = { security.pam.oath = {
enable = mkOption { enable = lib.mkOption {
type = types.bool; type = lib.types.bool;
default = false; default = false;
description = '' description = ''
Enable the OATH (one-time password) PAM module. Enable the OATH (one-time password) PAM module.
''; '';
}; };
digits = mkOption { digits = lib.mkOption {
type = types.enum [ 6 7 8 ]; type = lib.types.enum [ 6 7 8 ];
default = 6; default = 6;
description = '' description = ''
Specify the length of the one-time password in number of Specify the lib.length of the one-time password in number of
digits. digits.
''; '';
}; };
window = mkOption { window = lib.mkOption {
type = types.int; type = lib.types.int;
default = 5; default = 5;
description = '' description = ''
Specify the number of one-time passwords to check in order Specify the number of one-time passwords to check in order
@ -36,8 +32,8 @@ with lib;
''; '';
}; };
usersFile = mkOption { usersFile = lib.mkOption {
type = types.path; type = lib.types.path;
default = "/etc/users.oath"; default = "/etc/users.oath";
description = '' description = ''
Set the path to file where the user's credentials are Set the path to file where the user's credentials are