2015-01-03 16:47:38 +00:00
|
|
|
{ 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.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2019-05-15 20:56:58 +00:00
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.fprintd;
|
|
|
|
defaultText = "pkgs.fprintd";
|
|
|
|
example = "pkgs.fprintd-thinkpad";
|
|
|
|
description = ''
|
|
|
|
fprintd package to use.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2015-01-03 16:47:38 +00:00
|
|
|
};
|
2019-04-14 14:19:57 +00:00
|
|
|
|
2015-01-03 16:47:38 +00:00
|
|
|
};
|
2019-04-14 14:19:57 +00:00
|
|
|
|
|
|
|
|
2015-01-03 16:47:38 +00:00
|
|
|
###### implementation
|
2019-04-14 14:19:57 +00:00
|
|
|
|
2015-01-03 16:47:38 +00:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.dbus.packages = [ pkgs.fprintd ];
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.fprintd ];
|
|
|
|
|
2019-05-15 20:56:58 +00:00
|
|
|
systemd.packages = [ cfg.package ];
|
2015-01-03 16:47:38 +00:00
|
|
|
|
|
|
|
};
|
2019-04-14 14:19:57 +00:00
|
|
|
|
2015-01-03 16:47:38 +00:00
|
|
|
}
|