Johan Rong 1 lună în urmă
părinte
comite
27342a6e4d
2 a modificat fișierele cu 11 adăugiri și 24 ștergeri
  1. 11 1
      hosts/ono/nixos/default.nix
  2. 0 23
      nixos/modules/hardware/biometric/biopass.nix

+ 11 - 1
hosts/ono/nixos/default.nix

@@ -2,6 +2,7 @@
 
 let 
   hosts = import ../../../config/hosts.nix;
+  biopass = pkgs.callPackage ../../../nixos/programs/biopass.nix {};
 in
 {
   imports = [
@@ -18,7 +19,6 @@ in
     ../../../nixos/modules/hardware/networking
     ../../../nixos/modules/hardware/sound
     ../../../nixos/modules/hardware/bluetooth
-    ../../../nixos/modules/hardware/biometric/biopass.nix
     # ../../../nixos/modules/hardware/biometric/fingerprint
     ../../../nixos/modules/hardware/battery
 
@@ -35,4 +35,14 @@ in
   ];
 
   networking.hostName = hosts.ono.hostname;
+
+  environment.systemPackages = [ biopass ];
+
+  security.pam.services.sudo.text = lib.mkBefore ''
+    auth sufficient ${biopass}/lib/security/pam_biopass.so
+  '';
+  
+  security.pam.services.login.text = lib.mkBefore ''
+    auth sufficient ${biopass}/lib/security/pam_biopass.so
+  '';
 }

+ 0 - 23
nixos/modules/hardware/biometric/biopass.nix

@@ -1,23 +0,0 @@
-{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, openssl, onnxruntime, glib, gtk3 }:
-
-stdenv.mkDerivation rec {
-  pname = "biopass";
-  version = "1.4.1";
-
-  src = fetchFromGitHub {
-    owner = "ticklabvn";
-    repo = "biopass";
-    rev = "v${version}";
-    hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
-  };
-
-  nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ openssl onnxruntime glib gtk3 ];
-
-  meta = with lib; {
-    description = "An alternative to Windows Hello/Howdy";
-    homepage = "https://github.com/TickLabVN/biopass";
-    license = licenses.mit;
-    platforms = platforms.linux;
-  };
-}