Before the XDG variables would be set from the user's environment, if available. This would break some tests. With this change the tests should be fully deterministic. Fixes #1190
nixfmt
- Move all module tests to their own directories. - Avoid duplication of `// import`.