Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/fprintd: option to inhibit PAM rule creation #107320

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nixos/modules/security/pam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ let
};

fprintAuth = mkOption {
default = config.services.fprintd.enable;
default = config.services.fprintd.enable && config.services.fprintd.global;
type = types.bool;
description = ''
If set, fingerprint reader will be used (if exists and
Expand Down
32 changes: 14 additions & 18 deletions nixos/modules/services/security/fprintd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@
with lib;

let

cfg = config.services.fprintd;

in


{

###### interface

options = {

services.fprintd = {

enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable fprintd daemon and PAM module for fingerprint readers handling.
Whether to enable fprintd daemon and PAM module for fingerprint
readers handling.
'';
};

global = mkOption {
type = types.bool;
default = true;
description = ''
Whether to create <literal>fprintAuth</literal> PAM rules for all
services when <literal>services.fprintd.enable</literal> is
<literal>true</literal>.
'';
};

Expand All @@ -33,22 +37,14 @@ in
fprintd package to use.
'';
};

};

};


###### implementation

config = mkIf cfg.enable {

services.dbus.packages = [ pkgs.fprintd ];

environment.systemPackages = [ pkgs.fprintd ];

services.dbus.packages = [ cfg.package ];
environment.systemPackages = [ cfg.package ];
systemd.packages = [ cfg.package ];

};

}