nixos/fprintd: add service and pam support

This commit is contained in:
Nikolay Amiantov
2015-01-03 19:50:40 +03:00
parent 006dceba14
commit a164a0b4c5
3 changed files with 65 additions and 0 deletions
@@ -0,0 +1,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";
};
};
};
}