Pulumi isn't designed to work at the operating system level. You can use dynamic providers to provision OS resources, but I personally tend to stick with what things are good at 🙂
The MIT open learning platform is OSS, uses Pulumi for provisioning anything with an API and uses pyinfra for the OS level. You can see it here:
https://github.com/mitodl/ol-infrastructure
The two work very well together!