I’m sure it’s obvious I am still quite early in my NixOS journey all things considered, and the split of utilizing both imports and mkEnableOption boils down to finding my footing and establishing what works for me. That being said, I can definitely take a lot away from this conversation in understanding why someone might use one in favor of the other.
My only real question in regards to strictly using imports; is the increase in the total amount of modules with only a few lines worth it?
From what I can tell the main benefit of using enable-options over imports is that you can have behavior that crosses module boundaries.
E.g., if you had a config.services.myservice.use_postgres_for_database=true; that causes config.services.postgres.enable=true plus maybe setting up postgres users and databases for myservice. And we have a similar dynamic going for systemd services.
It seems to me this would be quite a bit more awkward to achieve if one adhered to using only imports (at least if one did so strictly).
Add to this services that allow you to e.g. switch between mysql and postgres, and set up default config for both, depending on which you enable. It’d be completely impossible to model the NixOS modules if adding them to imports enabled them.
I don’t think it’s really worth discussing this further, unless someone actually sat down and tried to show a better implementation. There’s no alternative presented, so there are no trade-offs to discuss.