Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPTSD: Option "services.iptsd.config.Touch" is called "Touchscreen" in v3 #344002

Closed
xieve opened this issue Sep 23, 2024 · 6 comments · Fixed by #344036
Closed

IPTSD: Option "services.iptsd.config.Touch" is called "Touchscreen" in v3 #344002

xieve opened this issue Sep 23, 2024 · 6 comments · Fixed by #344036
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@xieve
Copy link

xieve commented Sep 23, 2024

Describe the bug

The option services.iptsd.config.Touch declared here is invalid in IPTSD v3, because it has been renamed Touchscreen to differentiate it from Touchpad. It does not have any effect.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add to configuration
services.iptsd = {
  enable = true;
  config.Touch = {
    DisableOnStylus = true;
    DisableOnPalm = true;
  };
};
  1. Observe that neither option is effective.

Expected behavior

I expected the options to work as documented.

Additional context

You can find the relevant commit in IPTSD here or consult the sample configuration file that is linked in the docstring for services.iptsd.config to confirm.

I would suggest that that link is updated to a permalink pointing to the version that is built by the nix package, instead of pointing to the latest.

Further, I would suggest that all options in services.iptsd.config be removed, due to the following reasons:

  • There are far more options than currently documented
  • The fact that some of them are, while others aren't, can potentially be confusing
  • As one can see here, they are subject to change
  • Other packages that implement a subset of available options similar to this follow a pattern where you can find those options in the "root" of the module options, e.g. services.*, and additionally have an attribute set option called extraConfig or similar that is empty by default

Notify maintainers

@dotlambda

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix run nixpkgs#nix-info -- -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.5, NixOS, 24.11 (Vicuna), 24.11.20240919.c04d565`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/hiasfhl8f5yy88hcfbr3s8s4bm63wsjw-source`

Add a 👍 reaction to issues you find important.

@xieve xieve added the 0.kind: bug Something is broken label Sep 23, 2024
@dotlambda
Copy link
Member

There are far more options than currently documented

That's why it's a freeformType. See NixOS/rfcs#42.

@dotlambda
Copy link
Member

I would suggest that that link is updated to a permalink pointing to the version that is built by the nix package, instead of pointing to the latest.

That would require the documentation to built with access to packages which is discouraged.

@dotlambda
Copy link
Member

Observe that neither option is effective.

They should still be effective: linux-surface/iptsd@a82807a#diff-e44a9efb23b83082a47e537baba837e84d2327ff3779da425942972e7a0e84d7R188

@dotlambda dotlambda added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Sep 23, 2024
@xieve
Copy link
Author

xieve commented Sep 24, 2024

That would require the documentation to built with access to packages which is discouraged.

Ah, okay, that makes sense.

They should still be effective

Damn it, that means I need to fiddle with the other options... Sorry about that.

Thanks for the quick response :)

@xieve
Copy link
Author

xieve commented Sep 24, 2024

Observe that neither option is effective.

It's the other way around:

services.iptsd.config.Touchscreen = {
  DisableOnStylus = true;
  DisableOnPalm = true;
};

This has no effect! Since the declaration of the default values comes first. That's where my confusion came from.

Is there a good way to avoid this? Maybe set those options at the end of the ini, instead of the beginning? I assume it is parsed top-down and re-declarations are ignored.

@dotlambda
Copy link
Member

Is there a good way to avoid this?

My PR will fix it. You can keep using Touch and it will override whichever default is set for Touchscreen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants