mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
54 lines
792 B
Nix
54 lines
792 B
Nix
{ 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";
|
|
description = ''
|
|
fprintd package to use.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.dbus.packages = [ pkgs.fprintd ];
|
|
|
|
environment.systemPackages = [ pkgs.fprintd ];
|
|
|
|
systemd.packages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|