nixos/pam: rename u2fAuth -> u2f.enable

This commit is contained in:
Majiir Paktu
2026-04-11 22:07:56 -04:00
parent 27c3e94446
commit d0ea24542d
2 changed files with 17 additions and 14 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ in
description = ''
Whether to enable U2F support in the i3lock program.
U2F enables authentication using a hardware device, such as a security key.
When U2F support is enabled, the i3lock program will set the setuid bit on the i3lock binary and enable the pam u2fAuth service,
When U2F support is enabled, the i3lock program will set the setuid bit on the i3lock binary and enable the pam u2f service,
'';
};
};
@@ -51,7 +51,7 @@ in
source = "${cfg.package.out}/bin/i3lock";
};
security.pam.services.i3lock.u2fAuth = cfg.u2fSupport;
security.pam.services.i3lock.u2f.enable = cfg.u2fSupport;
};
+15 -12
View File
@@ -135,6 +135,7 @@ let
imports = [
(lib.mkRenamedOptionModule [ "enableKwallet" ] [ "kwallet" "enable" ])
(lib.mkRenamedOptionModule [ "u2fAuth" ] [ "u2f" "enable" ])
];
options = {
@@ -202,17 +203,19 @@ let
'';
};
u2fAuth = lib.mkOption {
default = config.security.pam.u2f.enable;
defaultText = lib.literalExpression "config.security.pam.u2f.enable";
type = lib.types.bool;
description = ''
If set, users listed in
{file}`$XDG_CONFIG_HOME/Yubico/u2f_keys` (or
{file}`$HOME/.config/Yubico/u2f_keys` if XDG variable is
not set) are able to log in with the associated U2F key. Path can be
changed using {option}`security.pam.u2f.authFile` option.
'';
u2f = {
enable = lib.mkOption {
default = config.security.pam.u2f.enable;
defaultText = lib.literalExpression "config.security.pam.u2f.enable";
type = lib.types.bool;
description = ''
If set, users listed in
{file}`$XDG_CONFIG_HOME/Yubico/u2f_keys` (or
{file}`$HOME/.config/Yubico/u2f_keys` if XDG variable is
not set) are able to log in with the associated U2F key. Path can be
changed using {option}`security.pam.u2f.authFile` option.
'';
};
};
usshAuth = lib.mkOption {
@@ -1045,7 +1048,7 @@ let
in
{
name = "u2f";
enable = cfg.u2fAuth;
enable = cfg.u2f.enable;
control = u2f.control;
modulePath = "${pkgs.pam_u2f}/lib/security/pam_u2f.so";
inherit (u2f) settings;