1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00
nixpkgs/nixos/modules/services/security/fprintd.nix

63 lines
1.1 KiB
Nix
Raw Normal View History

{ 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.
'';
};
package = mkOption {
type = types.package;
default = pkgs.fprintd;
defaultText = "pkgs.fprintd";
example = "pkgs.fprintd-thinkpad";
description = ''
fprintd package to use.
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
services.dbus.packages = [ pkgs.fprintd ];
environment.systemPackages = [ pkgs.fprintd ];
systemd.packages = [ cfg.package ];
2019-05-26 14:24:10 +01:00
# The upstream unit does not use StateDirectory, and will
# fail if the directory it needs is not present. Should be
# fixed when https://gitlab.freedesktop.org/libfprint/fprintd/merge_requests/5
# is merged.
systemd.services.fprintd.serviceConfig.StateDirectory = "fprint";
};
}