···33description: Conventions for writing modules in this flake.
44---
5566+## Introduction
77+68When writing a module, you should follow these guidelines:
7988-- Use a tree-like structure for the head lambda args if and only if it is needed.
1010+### Module Headers
1111+1212+1313+Use a tree-like structure for the head lambda args if and only if it is needed.
9141015 ```nix
1116 {
···1924 }
2025 ```
21262222-- `imports` should do its best to avoid going backwards in the flake's file structure.
2727+### File Structure
2828+2929+Every use of `imports` should make a good attempt not to use `../` (going up in
3030+the file structure). I would like to have a simple file structure and this
3131+helps achieve that.
23323333+### Lib Usage
3434+3535+When using lib you should ideally be as specific as possible. This may look
3636+like moving from `lib.mkOption` to `lib.options.mkOption`.