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

nixos/logiops: init #287399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

nixos/logiops: init #287399

wants to merge 1 commit into from

Commits on Mar 3, 2024

  1. nixos/logiops: init

    The logiops package already exists, but without a systemd service.
    
    refactor: Use `udev` to restart service when mouse connected.
    
    Old method used a somewhat jank `modprobe` to load the
    `hid_logitech_hidpp` kernel module.
    
    fix: Remove `IPAddressDeny` from service.
    
    It is redundant since we already set `PrivateNetwork = true`.
    
    fix: Allow service access to all of `/dev`.
    
    If the user has many devices connected, they may run into issues with
    the `DeviceAllow` permission. Ideally, we would only allow access to
    `/dev/uinput` and `/dev/hidraw*`, but globbing is unavailable for device
    node path specifications:
    
    https://www.freedesktop.org/software/systemd/man/252/systemd.resource-control.html
    
    refactor: Use `libconfig` generator.
    
    fix: Format type should be `libconfig`.
    
    fix: Incorrect way to add a file to `/etc`.
    
    fix: DeviceAllow permissions.
    
    `hidraw` is a character device in `/proc/devices`, so we should be able
    to match it in `DeviceAllow`. Additionally, matching against `/dev`
    doesn't do anything, as device node path specifications need to be fully
    specified.
    
    feat: Allow access to `AF_UNIX`.
    
    This is needed since the newer version of `logiops` requires GDBus.
    
    See PR#289701.
    
    fix: Update service restart condition.
    
    Sometimes the service will error out and fail to apply the user's
    configuration if the mouse is disconnected and then reconnected. The
    updated `udev` rule restarts the service any time a Logitech device is
    connected.
    
    feat: Add example config.
    
    fix: systemd wantedBy option.
    
    See: https://github.com/NixOS/nixpkgs/pull/287399/files/15700feac734cbacb3fb9dd0f5cbfc04a27058d9#r1493869013
    
    feat: Allow package override.
    
    fix: Use `literalExpression` for example package.
    
    fix: Stop using `literalExpression` for example.
    
    test: Add test to see if service starts properly.
    
    fix: Revert `pkgs.` prefix for example.
    
    fix: Only restart the service if it is already running.
    
    refactor: Use overridden `systemd`.
    kylechui committed Mar 3, 2024
    Configuration menu
    Copy the full SHA
    14d265d View commit details
    Browse the repository at this point in the history