Currently, we seem to have a giant string we interpolate values into inside common-config.nix. We furthermore have ad-hoc optionalString in there to expose certain options only for certain kernel versions.
It seems like it wouldn't be hard to generate that giant string automatically with Nix, along with a simple way to define new options scoped to particular kernel versions. It could even use the module system outside of the standard NixOS configuration mechanism!
Currently, we seem to have a giant string we interpolate values into inside common-config.nix. We furthermore have ad-hoc
optionalStringin there to expose certain options only for certain kernel versions.It seems like it wouldn't be hard to generate that giant string automatically with Nix, along with a simple way to define new options scoped to particular kernel versions. It could even use the module system outside of the standard NixOS configuration mechanism!