feat: derive desktop input and SDDM scale from host metadata
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hostInput = config.meta.host.input;
|
||||
|
||||
outputs = lib.mapAttrs (
|
||||
_: display:
|
||||
{
|
||||
@@ -49,6 +51,27 @@
|
||||
rawTerminalAttrPath;
|
||||
terminalPackage = lib.attrByPath terminalAttrPath null pkgs;
|
||||
hasMainProgram = terminalPackage != null && terminalPackage ? meta.mainProgram;
|
||||
|
||||
mouseSettings = lib.filterAttrs (_: value: value != null) {
|
||||
accel-profile = hostInput.mouse.accelProfile;
|
||||
accel-speed = hostInput.mouse.accelSpeed;
|
||||
left-handed = hostInput.mouse.leftHanded;
|
||||
middle-emulation = hostInput.mouse.middleEmulation;
|
||||
natural-scroll = hostInput.mouse.naturalScrolling;
|
||||
scroll-method = hostInput.mouse.scrollMethod;
|
||||
};
|
||||
|
||||
touchpadSettings = lib.filterAttrs (_: value: value != null) {
|
||||
accel-profile = hostInput.touchpad.accelProfile;
|
||||
accel-speed = hostInput.touchpad.accelSpeed;
|
||||
click-method = hostInput.touchpad.clickMethod;
|
||||
dwt = hostInput.touchpad.disableWhileTyping;
|
||||
left-handed = hostInput.touchpad.leftHanded;
|
||||
middle-emulation = hostInput.touchpad.middleEmulation;
|
||||
natural-scroll = hostInput.touchpad.naturalScrolling;
|
||||
scroll-method = hostInput.touchpad.scrollMethod;
|
||||
tap = hostInput.touchpad.tapping;
|
||||
};
|
||||
in
|
||||
{
|
||||
assertions = [
|
||||
@@ -139,7 +162,12 @@
|
||||
repeat-rate = 50;
|
||||
xkb.options = "caps:escape";
|
||||
};
|
||||
mouse.accel-speed = 0.4;
|
||||
}
|
||||
// lib.optionalAttrs (mouseSettings != { }) {
|
||||
mouse = mouseSettings;
|
||||
}
|
||||
// lib.optionalAttrs (touchpadSettings != { }) {
|
||||
touchpad = touchpadSettings;
|
||||
};
|
||||
|
||||
binds =
|
||||
|
||||
Reference in New Issue
Block a user