Conditionally Import Configurations with Home-Manager

You should know that using import in the module system is fighting the module system. Don’t do it! Use imports (only) instead.

Further discussion here: Import but don’t import your NixOS modules - #4 by waffle8946

FWIW I stick all my modules in a modules/ directory and automatically add everything in it to imports.