From e3dc1908af3169ffc099095d8e64943c015a2f66 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 22 Mar 2024 18:29:12 -0400 Subject: [PATCH] Fingerprint support --- hosts/Dimaga/default.nix | 1 + hosts/Shura/default.nix | 1 + modules/services/default.nix | 1 + modules/services/fprintd.nix | 21 +++++++++++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 modules/services/fprintd.nix diff --git a/hosts/Dimaga/default.nix b/hosts/Dimaga/default.nix index 4a1acb2..4d56f08 100644 --- a/hosts/Dimaga/default.nix +++ b/hosts/Dimaga/default.nix @@ -20,6 +20,7 @@ office.enable = true; pandoc.enable = true; }; + services.fprintd.enable = true; ui = { flatpak.enable = true; gnome.enable = true; diff --git a/hosts/Shura/default.nix b/hosts/Shura/default.nix index 0fdecb9..a66580e 100644 --- a/hosts/Shura/default.nix +++ b/hosts/Shura/default.nix @@ -36,6 +36,7 @@ in pandoc.enable = true; recording.enable = true; }; + services.fprintd.enable = true; ui = { flatpak.enable = true; gnome.enable = true; diff --git a/modules/services/default.nix b/modules/services/default.nix index e0a4a78..3882ec9 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -2,6 +2,7 @@ imports = [ ./apcupsd.nix ./duplicacy-web.nix + ./fprintd.nix ./k3s.nix ./msmtp.nix ]; diff --git a/modules/services/fprintd.nix b/modules/services/fprintd.nix new file mode 100644 index 0000000..94227f1 --- /dev/null +++ b/modules/services/fprintd.nix @@ -0,0 +1,21 @@ +{ pkgs, config, lib, ... }: +let + cfg = config.host.services.fprintd; +in +with lib; +{ + options = { + host.services.fprintd.enable = mkEnableOption (mdDoc "Enables fingerprint recognition"); + }; + + config = mkIf cfg.enable { + nixpkgs.config.allowUnfree = true; + services.fprintd = { + enable = true; + tod = { + enable = true; + driver = pkgs.libfprint-2-tod1-elan; + }; + }; + }; +} \ No newline at end of file