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