From c520b483204b72ce1d22db8124e71c456af7d6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Tue, 15 Oct 2024 20:31:40 +0300 Subject: [PATCH] Improve onlykey conf --- key-management.nix | 9 +-------- misc/custom-iso-base.nix | 7 +------ users/vili.nix | 5 ----- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/key-management.nix b/key-management.nix index e0e08ae..0fd5581 100644 --- a/key-management.nix +++ b/key-management.nix @@ -21,17 +21,10 @@ onlykey-agent ]; - programs.ssh.startAgent = pkgs.lib.mkForce false; # TEMPORARY! programs.gnupg.agent = { enable = true; enableSSHSupport = true; pinentryPackage = pkgs.pinentry-curses; }; - - services.udev.extraRules = with pkgs; '' - ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{ID_MM_DEVICE_IGNORE}="1" - ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{MTP_NO_PROBE}="1" - SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", OWNER:="vili", RUN+="${onlykey-cli}/bin/onlykey-cli settime" - KERNEL=="ttyACM*", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", OWNER:="vili", RUN+="${onlykey-cli}/bin/onlykey-cli settime" - ''; + hardware.onlykey.enable = true; } diff --git a/misc/custom-iso-base.nix b/misc/custom-iso-base.nix index 743736f..0a51f14 100644 --- a/misc/custom-iso-base.nix +++ b/misc/custom-iso-base.nix @@ -81,12 +81,7 @@ in enableSSHSupport = true; pinentryPackage = pkgs.pinentry-curses; }; - services.udev.extraRules = '' - ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{ID_MM_DEVICE_IGNORE}="1" - ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", ENV{MTP_NO_PROBE}="1" - SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", MODE:="0666" - KERNEL=="ttyACM*", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60fc", MODE:="0666" - ''; + hardware.onlykey.enable = true; isoImage.squashfsCompression = "gzip -Xcompression-level 1"; diff --git a/users/vili.nix b/users/vili.nix index 391598a..0288694 100644 --- a/users/vili.nix +++ b/users/vili.nix @@ -15,9 +15,4 @@ }; users.groups.vili.gid = 1000; - - programs.ssh = { - startAgent = true; - enableAskPassword = false; - }; }