From a164a0b4c571540289d4fd5d5bdbe3ca70e94f63 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 3 Jan 2015 19:47:38 +0300 Subject: nixos/fprintd: add service and pam support --- nixos/modules/services/security/fprintd.nix | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 nixos/modules/services/security/fprintd.nix (limited to 'nixos/modules/services/security') diff --git a/nixos/modules/services/security/fprintd.nix b/nixos/modules/services/security/fprintd.nix new file mode 100644 index 000000000000..a35b065ba815 --- /dev/null +++ b/nixos/modules/services/security/fprintd.nix @@ -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"; + }; + }; + + }; + +} -- cgit 1.4.1