summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-06-14 15:12:23 +0200
committerFlorian Klink <flokli@flokli.de>2020-06-14 15:13:31 +0200
commit89c3e73dad0970b26183e415555fb0379ba33e7a (patch)
tree94d7d2b47bd791243ae9e93ad7c43643fc0500ce
parentc92b33df884be886ecdff697ec36b4c39cc4cfdf (diff)
downloadnixpkgs-89c3e73dad0970b26183e415555fb0379ba33e7a.tar
nixpkgs-89c3e73dad0970b26183e415555fb0379ba33e7a.tar.gz
nixpkgs-89c3e73dad0970b26183e415555fb0379ba33e7a.tar.bz2
nixpkgs-89c3e73dad0970b26183e415555fb0379ba33e7a.tar.lz
nixpkgs-89c3e73dad0970b26183e415555fb0379ba33e7a.tar.xz
nixpkgs-89c3e73dad0970b26183e415555fb0379ba33e7a.tar.zst
nixpkgs-89c3e73dad0970b26183e415555fb0379ba33e7a.zip
hardware/u2f: remove module
udev gained native support to handle FIDO security tokens, so we don't
need a module which only added the now obsolete udev rules.

Fixes: https://github.com/NixOS/nixpkgs/issues/76482
-rw-r--r--nixos/doc/manual/release-notes/rl-2009.xml6
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/rename.nix6
-rw-r--r--nixos/modules/services/hardware/u2f.nix23
-rw-r--r--pkgs/development/libraries/libu2f-host/default.nix4
5 files changed, 12 insertions, 28 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml
index 848e5e63a9c..a702b2a0f24 100644
--- a/nixos/doc/manual/release-notes/rl-2009.xml
+++ b/nixos/doc/manual/release-notes/rl-2009.xml
@@ -543,6 +543,12 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
      <link xlink:href="https://grafana.com/docs/grafana/latest/installation/upgrading/#upgrading-to-v7-0">in the Grafana documentation</link>.
     </para>
    </listitem>
+   <listitem>
+    <para>
+     The <literal>hardware.u2f</literal> module, which was installing udev rules
+     was removed, as udev gained native support to handle FIDO security tokens.
+    </para>
+   </listitem>
   </itemizedlist>
  </section>
 </section>
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 321fec5fb51..8a517314429 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -362,7 +362,6 @@
   ./services/hardware/throttled.nix
   ./services/hardware/trezord.nix
   ./services/hardware/triggerhappy.nix
-  ./services/hardware/u2f.nix
   ./services/hardware/udev.nix
   ./services/hardware/udisks2.nix
   ./services/hardware/upower.nix
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index c91febdb710..1dc7f853317 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -55,6 +55,12 @@ with lib;
       prey-bash-client is deprecated upstream
     '')
 
+    (mkRemovedOptionModule ["hardware" "u2f" ] ''
+      The U2F modules module was removed, as all it did was adding the
+      udev rules from libu2f-host to the system. Udev gained native support
+      to handle FIDO security tokens, so this isn't necessary anymore.
+    '')
+
     # Do NOT add any option renames here, see top of the file
   ];
 }
diff --git a/nixos/modules/services/hardware/u2f.nix b/nixos/modules/services/hardware/u2f.nix
deleted file mode 100644
index bb4b2f05f89..00000000000
--- a/nixos/modules/services/hardware/u2f.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-let
-  cfg = config.hardware.u2f;
-in {
-  options = {
-    hardware.u2f = {
-      enable = mkOption {
-        type = types.bool;
-        default = false;
-        description = ''
-          Enable U2F hardware support.
-        '';
-      };
-    };
-  };
-
-  config = mkIf cfg.enable {
-    services.udev.packages = [ pkgs.libu2f-host ];
-  };
-}
-
diff --git a/pkgs/development/libraries/libu2f-host/default.nix b/pkgs/development/libraries/libu2f-host/default.nix
index 3becd075b25..f033aa9f610 100644
--- a/pkgs/development/libraries/libu2f-host/default.nix
+++ b/pkgs/development/libraries/libu2f-host/default.nix
@@ -14,10 +14,6 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  postInstall = ''
-    install -D -t $out/lib/udev/rules.d 70-u2f.rules
-  '';
-
   meta = with stdenv.lib; {
     homepage = "https://developers.yubico.com/libu2f-host";
     description = "A C library and command-line tool that implements the host-side of the U2F protocol";