I want to add a udev rule to set
sysctl -w vm.swappiness = 100 on machines where the boot partition is on a flash storage device.
My current system uses an NVMe card, which I can detect as
SUBSYSTEM="nvme", but I think (I don't have one available to check at the moment) that value for SATA SSDs is
"scsi", which is not SSD-specific. Actually, as I write this I dimly recall some manufacturer recently announced spinning disk NVMes for some niche usage, so that's not perfect either (though it'd be fine for my purposes).
How can I somewhat reliably detect the.. 'technology' of a storage device in a udev rule?