about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/security/fprintd.nix
blob: a35b065ba815636f41acb60a2d5ae601eace600a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ config, lib, pkgs, ... }:

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.
        '';
      };

    };
    
  };
  
  
  ###### implementation
  
  config = mkIf cfg.enable {

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

    environment.systemPackages = [ pkgs.fprintd ];

    systemd.services.fprintd = {
      description = "Fingerprint Authentication Daemon";

      serviceConfig = {
        Type = "dbus";
        BusName = "net.reactivated.Fprint";
        ExecStart = "${pkgs.fprintd}/libexec/fprintd";
      };
    };

  };
  
}