Configuration is now held by the `.org` files. All `.nix` files are tangled from the org-mode files.
1.3 KiB
1.3 KiB
PineTab2
PineTab2
A few tweaks are specific to my PineTab2 tablet: getting a serial
console working at boot, exposing its sensors, and making it easy to
find on whatever network it’s connected to. Here’s the skeleton of the
nixos.pinetab2 module.
{
flake.modules.nixos.pinetab2 = {
<<kernel-params>>
<<sensors>>
<<avahi>>
};
}
Serial Console
These kernel parameters get me a working serial console on the tablet’s UART at boot, and point the kernel at the SD card’s root filesystem by label rather than by a device path that can shift around.
boot.kernelParams = ["console=tty0" "console=ttyS2,1500000n8" "rootwait" "root=LABEL=NIXOS_SD" "rw"];
Sensors
Turning on the IIO (Industrial I/O) subsystem exposes the tablet’s accelerometer and ambient light sensor, which is what lets things like auto-rotate work.
hardware.sensor.iio.enable = true;
Finding It on the Network
The tablet moves between networks a lot, so Avahi lets me reach it by
its .local hostname over mDNS instead of having to look up whatever IP
it was handed.
services.avahi = {
enable = true;
openFirewall = true;
};