I’m trying to figure out how to conditionally import a module if it exists in the path, but I think this might cause some weird recursion issue? The use case is that I want a mostly standard config across machines published to a git repo, but a very small local config that is gitignored, with tweaks and potentially some private info that I don’t want it git. Here is my awful attempt:
The quick, hacky solution, would just be to create the file with empty contents for machines which don’t need it. echo "{ }" > /etc/nixos/config.local.nix, and make the import mandatory.