1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6
7 cfg = config.services.fprintd;
8
9in
10
11
12{
13
14 ###### interface
15
16 options = {
17
18 services.fprintd = {
19
20 enable = mkOption {
21 type = types.bool;
22 default = false;
23 description = ''
24 Whether to enable fprintd daemon and PAM module for fingerprint readers handling.
25 '';
26 };
27
28 };
29
30 };
31
32
33 ###### implementation
34
35 config = mkIf cfg.enable {
36
37 services.dbus.packages = [ pkgs.fprintd ];
38
39 environment.systemPackages = [ pkgs.fprintd ];
40
41 systemd.services.fprintd = {
42 description = "Fingerprint Authentication Daemon";
43
44 serviceConfig = {
45 Type = "dbus";
46 BusName = "net.reactivated.Fprint";
47 ExecStart = "${pkgs.fprintd}/libexec/fprintd";
48 };
49 };
50
51 };
52
53}