62c70dab19
The diff shows comprehensive code cleanup and formatting improvements across 18 files, including cleaner argument structures, additional package configurations, and improved formatting in the `home/terminal/software/git.nix` hook script.
39 lines
1000 B
Nix
39 lines
1000 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
# Fingerprint scanner configuration
|
|
#
|
|
# Enable on laptops with a fingerprint reader:
|
|
# hardware.fingerprint.enable = true;
|
|
#
|
|
# For some sensors (Goodix, Elan, Synaptics), you may also need to set
|
|
# the TOD driver:
|
|
# hardware.fingerprint.todDriver = pkgs.libfprint-2-tod1-goodix;
|
|
#
|
|
# Reference: https://wiki.nixos.org/wiki/Fingerprint_scanner
|
|
let
|
|
cfg = config.hardware.fingerprint;
|
|
in {
|
|
options.hardware.fingerprint = {
|
|
enable = lib.mkEnableOption "fingerprint scanner support (fprintd)";
|
|
|
|
todDriver = lib.mkOption {
|
|
description = "Touch OEM Drivers (TOD) package to use for the fingerprint sensor";
|
|
type = lib.types.nullOr lib.types.package;
|
|
default = null;
|
|
example = lib.literalExpression "pkgs.libfprint-2-tod1-goodix";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.fprintd.enable = true;
|
|
|
|
services.fprintd.tod = lib.mkIf (cfg.todDriver != null) {
|
|
enable = true;
|
|
driver = cfg.todDriver;
|
|
};
|
|
};
|
|
}
|