I did a refactor of my nix config following a pattern I learned from reading Davis’ setup. My two main uses right now for Nix/home-manager are to install and configure programs. Some of these programs have nix modules that allow for the configuration to be written in Nix. Others don’t, but you can still use Nix to create a config file for that program to read. I do the latter with skhd and goku to create a karabiner.json. With this refactor, I used the default.nix file to create program-specific module imports. I refactored my home.nix to use the same approach as well. This allows me to easily co-locate code to set up a given program, regardless of whether I am configuring it with Nix or by creating dotfiles.