Commit d0ea2454 authored by Majiir Paktu's avatar Majiir Paktu
Browse files

nixos/pam: rename u2fAuth -> u2f.enable

parent 27c3e944
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ let

      imports = [
        (lib.mkRenamedOptionModule [ "enableKwallet" ] [ "kwallet" "enable" ])
        (lib.mkRenamedOptionModule [ "u2fAuth" ] [ "u2f" "enable" ])
      ];

      options = {
@@ -202,7 +203,8 @@ let
          '';
        };

        u2fAuth = lib.mkOption {
        u2f = {
          enable = lib.mkOption {
            default = config.security.pam.u2f.enable;
            defaultText = lib.literalExpression "config.security.pam.u2f.enable";
            type = lib.types.bool;
@@ -214,6 +216,7 @@ let
              changed using {option}`security.pam.u2f.authFile` option.
            '';
          };
        };

        usshAuth = lib.mkOption {
          default = false;
@@ -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;