I did a thing, automatic screen rotation in Sway

I did a thing for Sway. GitHub - tbaumann/iio-sway: Listen iio-sensor-proxy and auto change sway output orientation

iio-sway will rotate the screen if the device is tilted (and iio-proxy is installed and has a acceleration sensor)

Looking for comments and letting you guys know…

I guess I could try to upstream that…

Also, perhaps hardware.sensor.iio.enable should be enabled automatically? Can this be done from a home manager module?

1 Like

It’s similar to this, but that just installs the package and does nothing to actually enable it nixpkgs/nixos/modules/programs/iio-hyprland.nix at 44534bc021b85c8d78e465021e21f33b856e2540 · NixOS/nixpkgs · GitHub

No, HM (user config) cannot manage system config.

Why would this be considered a system config? I (and probaly many others) do all my sway conf threw HM atm.

hardware.sensor.iio.enable is not a home manager option. But it’s a requirement to be enabled.

If your device benefits from iio enabled, nixos-hardware should probably enable it.

I was just hoping there is a batteries included way that enables the iio-proxy service when needed by my module.

But I guess it’s fine as a docu fix.