Old setup for pentablet

This commit is contained in:
Jacob Hinkle 2023-09-13 07:26:38 -04:00
parent 956165c4e3
commit ee4ff53921
5 changed files with 36 additions and 4 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.deb filter=lfs diff=lfs merge=lfs -text

View File

@ -40,6 +40,7 @@
inconsolata inconsolata
jq jq
keyutils # for keyctl, used by some bitwarden scripts like qute-bitwarden keyutils # for keyctl, used by some bitwarden scripts like qute-bitwarden
krita
libreoffice libreoffice
logseq logseq
mupdf mupdf
@ -61,6 +62,7 @@
tree tree
unzip unzip
xclip xclip
xournal
xpra xpra
zathura zathura
zoom-us zoom-us
@ -357,5 +359,9 @@
config = ./xmonad.hs; config = ./xmonad.hs;
}; };
}; };
initExtra = ''
xinput --map-to-output 'HANVON UGEE Artist 16(2nd Gen) Mouse' DP-1
xinput --map-to-output 'HANVON UGEE Artist 16(2nd Gen)' DP-1
'';
}; };
} }

View File

@ -8,7 +8,11 @@
inputs, inputs,
sops, sops,
... ...
}: { }:
let
xp_pen_pentablet = pkgs.callPackage ./xp_pen_pentablet.nix {};
in
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -87,8 +91,11 @@
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
networkmanager
networkmanagerapplet
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget wget
xp_pen_pentablet
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@ -166,12 +173,22 @@
udev.extraRules = '' udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness" ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
KERNEL=="hidraw", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
# For XP-PEN tablet
# From the official driver
KERNEL=="uinput",MODE:="0666",OPTIONS+="static_node=uinput"
SUBSYSTEMS=="usb",ATTRS{idVendor}=="28bd",MODE:="0666"
j
#KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="usb", ATTRS{idVendor}=="28bd", ATTRS{idProduct}=="094c", MODE="0664", GROUP="plugdev"
#KERNEL=="mouse[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="usb", ATTRS{idVendor}=="28bd", ATTRS{idProduct}=="094c", MODE="0664", GROUP="plugdev"
''; '';
# Enable the X11 windowing system. services.xserver.enable = true; # Enable the X11 windowing system. services.xserver.enable = true;
xserver = { xserver = {
enable = true; enable = true;
dpi = 112; # t470 has a 14" 16:9 monitor at native res 1366x768 dpi = 112; # t470 has a 14" 16:9 monitor at native res 1366x768
digimend.enable = true;
displayManager = { displayManager = {
defaultSession = "none+i3"; defaultSession = "none+i3";
autoLogin = { autoLogin = {
@ -190,6 +207,7 @@
disableWhileTyping = true; disableWhileTyping = true;
}; };
}; };
#wacom.enable = true;
windowManager.i3 = { windowManager.i3 = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [

View File

@ -46,4 +46,10 @@
powerManagement.cpuFreqGovernor = "powersave"; powerManagement.cpuFreqGovernor = "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# for XP-Pen tablet
#hardware.opentabletdriver = {
#enable = true;
#package = patchedOTD;
#};
} }

View File

@ -25,7 +25,7 @@
, lib , lib
, fetchurl , fetchurl
, glib , glib
, dbus_libs , dbus
, dpkg , dpkg
, autoPatchelfHook , autoPatchelfHook
, writeShellScript , writeShellScript
@ -44,7 +44,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "xp_pen_driver"; pname = "xp_pen_driver";
version = "3.2.0.210804-1"; version = "3.3.9.230222-1";
src = fetchurl { src = fetchurl {
#url = "https://github.com/peterwilli/XP-Pen-Pentablet-Driver-for-Nixos/releases/download/3.2.0.210804-1/XP-PEN-pentablet-3.2.0.210804-1.x86_64.deb"; #url = "https://github.com/peterwilli/XP-Pen-Pentablet-Driver-for-Nixos/releases/download/3.2.0.210804-1/XP-PEN-pentablet-3.2.0.210804-1.x86_64.deb";
@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
zlib zlib
libGL libGL
libusb libusb
dbus_libs dbus
fontconfig fontconfig
glib glib
freetype freetype
@ -81,6 +81,7 @@ stdenv.mkDerivation rec {
chmod 755 "$out" chmod 755 "$out"
chmod a+x $out/usr/lib/pentablet/pentablet.sh chmod a+x $out/usr/lib/pentablet/pentablet.sh
chmod a+x $out/usr/lib/pentablet/pentablet
runHook postInstall runHook postInstall
mkdir -p $out/bin mkdir -p $out/bin
makeWrapper $out/usr/lib/pentablet/pentablet.sh $out/bin/pentablet makeWrapper $out/usr/lib/pentablet/pentablet.sh $out/bin/pentablet