2024-10-10 19:49:52 +03:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
assertions = [
|
|
|
|
{
|
|
|
|
assertion = config.users.users ? "vili";
|
|
|
|
message = "User 'vili' needed for onlykey!";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
onlykey
|
|
|
|
onlykey-cli
|
|
|
|
onlykey-agent
|
|
|
|
];
|
|
|
|
|
2024-10-11 01:10:52 +03:00
|
|
|
programs.ssh.startAgent = pkgs.lib.mkForce false; # TEMPORARY!
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSSHSupport = true;
|
|
|
|
pinentryPackage = pkgs.pinentry-curses;
|
|
|
|
};
|
|
|
|
|
2024-10-15 17:10:25 +03:00
|
|
|
hardware.onlykey.enable = true;
|
|
|
|
# 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"
|
|
|
|
# '';
|
2024-10-10 19:49:52 +03:00
|
|
|
}
|