This implements a crude mechanism for signalling my router to add the
packets to its own qdisc.
The way in which this is implemented with nftables is hacky because of
NixOS’ limitations on build-time checking (which obviously can’t know
about the existence of cgroups on the target).
Because I most of the time use it with a charger connected, this avoids
it charging after begin unplugged for a short amount of time and just
barely falling below the threshold.
This configures the home profile for kanshi for an Acer B277K monitor.
Since it is both larger than my previous monitor and has a higher
resolution, a few things change with this.
For one, my preferred setup is now to just have one monitor instead of
having my laptop screen as a secondary display device. Therefore, logind
should not suspend if the lid is closed. Since it fails to accurately
detect when a dock is connected, it is configured to never suspend on
lid switch when external power is connected.
Another thing is that the high resolution makes it necessary to use a
scaling factor, which is quite easy to configure with sway and kanshi.
It does, however, not work for Xwayland clients (they render at a lower
resolution and are scaled up with nearest-neighbor interpolation).
That requires me to no longer force the qt backend to xcb for
qutebrowser, because that significantly lowers the browsing experience.
The setup for sayuri is still to be done.
When booted with my mouse connected to my kvm switch connected to my
dock connected to mayushii, powertop’s default configuration enables
power saving features that disable the mouse until it registers a click.
My current workaround is to unplug and plug the dock, so the hot-plug
input devices connected to it are reset.