push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.services.xserver.cmt;
etcPath = "X11/xorg.conf.d";
in
{
options = {
services.xserver.cmt = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable chrome multitouch input (cmt). Touchpad drivers that are configured for chromebooks.";
};
models = mkOption {
type = types.enum [
"atlas"
"banjo"
"candy"
"caroline"
"cave"
"celes"
"clapper"
"cyan"
"daisy"
"elan"
"elm"
"enguarde"
"eve"
"expresso"
"falco"
"gandof"
"glimmer"
"gnawty"
"heli"
"kevin"
"kip"
"leon"
"lulu"
"orco"
"pbody"
"peppy"
"pi"
"pit"
"puppy"
"quawks"
"rambi"
"samus"
"snappy"
"spring"
"squawks"
"swanky"
"winky"
"wolf"
"auron_paine"
"auron_yuna"
"daisy_skate"
"nyan_big"
"nyan_blaze"
"veyron_jaq"
"veyron_jerry"
"veyron_mighty"
"veyron_minnie"
"veyron_speedy"
];
example = "banjo";
description = ''
Which models to enable cmt for. Enter the Code Name for your Chromebook.
Code Name can be found at <https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices>.
'';
};
}; # closes services
}; # closes options
config = mkIf cfg.enable {
services.xserver.modules = [ pkgs.xf86_input_cmt ];
environment.etc = {
"${etcPath}/40-touchpad-cmt.conf" = {
source = "${pkgs.chromium-xorg-conf}/40-touchpad-cmt.conf";
};
"${etcPath}/50-touchpad-cmt-${cfg.models}.conf" = {
source = "${pkgs.chromium-xorg-conf}/50-touchpad-cmt-${cfg.models}.conf";
};
"${etcPath}/60-touchpad-cmt-${cfg.models}.conf" = {
source = "${pkgs.chromium-xorg-conf}/60-touchpad-cmt-${cfg.models}.conf";
};
};
assertions = [
{
assertion = !config.services.libinput.enable;
message = ''
cmt and libinput are incompatible, meaning you cannot enable them both.
To use cmt you need to disable libinput with `services.libinput.enable = false`
If you haven't enabled it in configuration.nix, it's enabled by default on a
different xserver module.
'';
}
];
};
}

View File

@@ -0,0 +1,42 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.services.xserver.digimend;
pkg = config.boot.kernelPackages.digimend;
in
{
options = {
services.xserver.digimend = {
enable = mkEnableOption "the digimend drivers for Huion/XP-Pen/etc. tablets";
};
};
config = mkIf cfg.enable {
# digimend drivers use xsetwacom and wacom X11 drivers
services.xserver.wacom.enable = true;
boot.extraModulePackages = [ pkg ];
environment.etc."X11/xorg.conf.d/50-digimend.conf".source =
"${pkg}/usr/share/X11/xorg.conf.d/50-digimend.conf";
};
}

View File

@@ -0,0 +1,248 @@
{
config,
lib,
options,
pkgs,
...
}:
with lib;
let
cfg = config.services.xserver.synaptics;
opt = options.services.xserver.synaptics;
tapConfig = if cfg.tapButtons then enabledTapConfig else disabledTapConfig;
enabledTapConfig = ''
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "TapButton1" "${builtins.elemAt cfg.fingersMap 0}"
Option "TapButton2" "${builtins.elemAt cfg.fingersMap 1}"
Option "TapButton3" "${builtins.elemAt cfg.fingersMap 2}"
'';
disabledTapConfig = ''
Option "MaxTapTime" "0"
Option "MaxTapMove" "0"
Option "TapButton1" "0"
Option "TapButton2" "0"
Option "TapButton3" "0"
'';
pkg = pkgs.xorg.xf86inputsynaptics;
etcFile = "X11/xorg.conf.d/70-synaptics.conf";
in
{
options = {
services.xserver.synaptics = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable touchpad support. Deprecated: Consider services.libinput.enable.";
};
dev = mkOption {
type = types.nullOr types.str;
default = null;
example = "/dev/input/event0";
description = ''
Path for touchpad device. Set to null to apply to any
auto-detected touchpad.
'';
};
accelFactor = mkOption {
type = types.nullOr types.str;
default = "0.001";
description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
};
minSpeed = mkOption {
type = types.nullOr types.str;
default = "0.6";
description = "Cursor speed factor for precision finger motion.";
};
maxSpeed = mkOption {
type = types.nullOr types.str;
default = "1.0";
description = "Cursor speed factor for highest-speed finger motion.";
};
scrollDelta = mkOption {
type = types.nullOr types.int;
default = null;
example = 75;
description = "Move distance of the finger for a scroll event.";
};
twoFingerScroll = mkOption {
type = types.bool;
default = false;
description = "Whether to enable two-finger drag-scrolling. Overridden by horizTwoFingerScroll and vertTwoFingerScroll.";
};
horizTwoFingerScroll = mkOption {
type = types.bool;
default = cfg.twoFingerScroll;
defaultText = literalExpression "config.${opt.twoFingerScroll}";
description = "Whether to enable horizontal two-finger drag-scrolling.";
};
vertTwoFingerScroll = mkOption {
type = types.bool;
default = cfg.twoFingerScroll;
defaultText = literalExpression "config.${opt.twoFingerScroll}";
description = "Whether to enable vertical two-finger drag-scrolling.";
};
horizEdgeScroll = mkOption {
type = types.bool;
default = !cfg.horizTwoFingerScroll;
defaultText = literalExpression "! config.${opt.horizTwoFingerScroll}";
description = "Whether to enable horizontal edge drag-scrolling.";
};
vertEdgeScroll = mkOption {
type = types.bool;
default = !cfg.vertTwoFingerScroll;
defaultText = literalExpression "! config.${opt.vertTwoFingerScroll}";
description = "Whether to enable vertical edge drag-scrolling.";
};
tapButtons = mkOption {
type = types.bool;
default = true;
description = "Whether to enable tap buttons.";
};
buttonsMap = mkOption {
type = types.listOf types.int;
default = [
1
2
3
];
example = [
1
3
2
];
description = "Remap touchpad buttons.";
apply = map toString;
};
fingersMap = mkOption {
type = types.listOf types.int;
default = [
1
2
3
];
example = [
1
3
2
];
description = "Remap several-fingers taps.";
apply = map toString;
};
palmDetect = mkOption {
type = types.bool;
default = false;
description = "Whether to enable palm detection (hardware support required)";
};
palmMinWidth = mkOption {
type = types.nullOr types.int;
default = null;
example = 5;
description = "Minimum finger width at which touch is considered a palm";
};
palmMinZ = mkOption {
type = types.nullOr types.int;
default = null;
example = 20;
description = "Minimum finger pressure at which touch is considered a palm";
};
horizontalScroll = mkOption {
type = types.bool;
default = true;
description = "Whether to enable horizontal scrolling (on touchpad)";
};
additionalOptions = mkOption {
type = types.str;
default = "";
example = ''
Option "RTCornerButton" "2"
Option "RBCornerButton" "3"
'';
description = ''
Additional options for synaptics touchpad driver.
'';
};
};
};
config = mkIf cfg.enable {
services.xserver.modules = [ pkg.out ];
environment.etc.${etcFile}.source = "${pkg.out}/share/X11/xorg.conf.d/70-synaptics.conf";
environment.systemPackages = [ pkg ];
services.xserver.config = ''
# Automatically enable the synaptics driver for all touchpads.
Section "InputClass"
Identifier "synaptics touchpad catchall"
MatchIsTouchpad "on"
${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''}
Driver "synaptics"
${optionalString (cfg.minSpeed != null) ''Option "MinSpeed" "${cfg.minSpeed}"''}
${optionalString (cfg.maxSpeed != null) ''Option "MaxSpeed" "${cfg.maxSpeed}"''}
${optionalString (cfg.accelFactor != null) ''Option "AccelFactor" "${cfg.accelFactor}"''}
${optionalString cfg.tapButtons tapConfig}
Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}"
Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}"
Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}"
Option "VertTwoFingerScroll" "${if cfg.vertTwoFingerScroll then "1" else "0"}"
Option "HorizTwoFingerScroll" "${if cfg.horizTwoFingerScroll then "1" else "0"}"
Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}"
Option "HorizEdgeScroll" "${if cfg.horizEdgeScroll then "1" else "0"}"
${optionalString cfg.palmDetect ''Option "PalmDetect" "1"''}
${optionalString (
cfg.palmMinWidth != null
) ''Option "PalmMinWidth" "${toString cfg.palmMinWidth}"''}
${optionalString (cfg.palmMinZ != null) ''Option "PalmMinZ" "${toString cfg.palmMinZ}"''}
${optionalString (
cfg.scrollDelta != null
) ''Option "VertScrollDelta" "${toString cfg.scrollDelta}"''}
${
if !cfg.horizontalScroll then
''Option "HorizScrollDelta" "0"''
else
(optionalString (
cfg.scrollDelta != null
) ''Option "HorizScrollDelta" "${toString cfg.scrollDelta}"'')
}
${cfg.additionalOptions}
EndSection
'';
assertions = [
{
assertion = !config.services.libinput.enable;
message = "Synaptics and libinput are incompatible, you cannot enable both.";
}
];
};
}

View File

@@ -0,0 +1,53 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.services.xserver.wacom;
in
{
options = {
services.xserver.wacom = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the Wacom touchscreen/digitizer/tablet.
If you ever have any issues such as, try switching to terminal (ctrl-alt-F1) and back
which will make Xorg reconfigure the device ?
If you're not satisfied by the default behaviour you can override
{option}`environment.etc."X11/xorg.conf.d/70-wacom.conf"` in
configuration.nix easily.
'';
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.xf86_input_wacom ]; # provides xsetwacom
services.xserver.modules = [ pkgs.xf86_input_wacom ];
services.udev.packages = [ pkgs.xf86_input_wacom ];
environment.etc."X11/xorg.conf.d/70-wacom.conf".source =
"${pkgs.xf86_input_wacom}/share/X11/xorg.conf.d/70-wacom.conf";
};
}