devenv
devenv copied to clipboard
Filter certrain processes on import in devenv.yaml
Problem: When importing another direnv.nix (e.g. because of the packages and scripts etc) you also import the processes. This means that devenv up gets very polluted and breaks (if a process cannot execute in the new location).
However importing some processes might be desired behavior anyways.
Solution: Support "skipping" processes on import. Example yaml could be:
import:
- backend/direnv.nix
- frontend/direnv.nix
maskProcesses:
- someBackendProcess
// OR
import:
- backend/direnv.nix:
maskProcesses:
- someBackendProcess
- frontend/direnv.nix
There are also other considerations like the services (which i have not used much yet) but afaik they are internally treated like a process.
My current workaround is to mkForce set the process to be empty in the current direnv.nix
processes.someBackendProcess.exec = lib.mkForce "";
This does work but is a mess to maintain and pollutes the nice devenv.nix :smile: