Compare commits
2 commits
e002b8482a
...
4601a972a2
Author | SHA1 | Date | |
---|---|---|---|
Antoine Martin | 4601a972a2 | ||
Antoine Martin | f2b3d33421 |
|
@ -111,6 +111,14 @@ in
|
||||||
};
|
};
|
||||||
my.displayManager.sddm.enable = true;
|
my.displayManager.sddm.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
chrysalis
|
||||||
|
];
|
||||||
|
|
||||||
|
services.udev.packages = with pkgs; [
|
||||||
|
packages.kaleidoscope-udev-rules
|
||||||
|
];
|
||||||
|
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
{
|
{
|
||||||
sddm-sugar-candy = pkgs.callPackage ./sddm-sugar-candy {};
|
sddm-sugar-candy = pkgs.callPackage ./sddm-sugar-candy {};
|
||||||
|
kaleidoscope-udev-rules = pkgs.callPackage ./kaleidoscope-udev-rules {};
|
||||||
}
|
}
|
||||||
|
|
16
pkgs/kaleidoscope-udev-rules/60-kaleidoscope.rules
Normal file
16
pkgs/kaleidoscope-udev-rules/60-kaleidoscope.rules
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
## This file sets up a few things for selected Kaleidoscope-powered keyboards:
|
||||||
|
## - We first symlink the device to a more friendly name, based on the product
|
||||||
|
## name.
|
||||||
|
## - We then ask ModemManager to ignore the serial ports on the device, and not
|
||||||
|
## consider them a candidate.
|
||||||
|
## - We also tell systemd to grant access to the device (via ACLs) to the user
|
||||||
|
## at-seat.
|
||||||
|
##
|
||||||
|
## For more information about the access part, see the following resources:
|
||||||
|
## - https://github.com/systemd/systemd/issues/4288
|
||||||
|
## - https://www.freedesktop.org/software/systemd/man/sd-login.html
|
||||||
|
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2303", SYMLINK+="Atreus2", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0", TAG+="uaccess", TAG+="seat"
|
25
pkgs/kaleidoscope-udev-rules/default.nix
Normal file
25
pkgs/kaleidoscope-udev-rules/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ stdenv, lib }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pname = "kaleidoscope-udev-rules";
|
||||||
|
version = "0.8.4";
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
# FIXME: fetch from GitHub properly
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib/udev/rules.d
|
||||||
|
cp ./60-kaleidoscope.rules $out/lib/udev/rules.d/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "udev rules for kaleidoscope firmware keyboards";
|
||||||
|
homepage = "https://github.com/keyboardio/Chrysalis";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue