Add basic support for onlykey
This commit is contained in:
parent
c5185ac416
commit
790be4e9a7
3 changed files with 24 additions and 0 deletions
22
hardware-specific/onlykey.nix
Normal file
22
hardware-specific/onlykey.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.users.users ? "vili";
|
||||
message = "User 'vili' needed for onlykey!";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
onlykey
|
||||
onlykey-cli
|
||||
onlykey-agent
|
||||
];
|
||||
|
||||
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"
|
||||
'';
|
||||
}
|
|
@ -76,6 +76,7 @@
|
|||
../hardware-specific/trackball.nix
|
||||
../hardware-specific/amd-laptop.nix
|
||||
../hardware-specific/usb-automount.nix
|
||||
../hardware-specific/onlykey.nix
|
||||
];
|
||||
|
||||
services.xserver.displayManager.setupCommands = ''
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
../hardware-specific/keychron-q11.nix
|
||||
../hardware-specific/trackball.nix
|
||||
../hardware-specific/usb-automount.nix
|
||||
../hardware-specific/onlykey.nix
|
||||
];
|
||||
|
||||
system.autoUpgrade.allowReboot = pkgs.lib.mkForce false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue