Skip to content

Commit

Permalink
docs: add "Basic module template" to modules/ README
Browse files Browse the repository at this point in the history
  • Loading branch information
InioX committed Oct 15, 2023
1 parent c9336a9 commit d931b97
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion modules/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
> **Warning**
> Almost all modules use aliases or functions from `zenyte-lib`, do not copy the modules and expect them to work everywhere.
📂 [modules/](./modules/) - All the modules

- 📁 [apps/](./modules/apps/) - GUI apps, tools
Expand All @@ -10,4 +13,30 @@

- 📁 [desktop/](./modules/desktop/) - DE/WM configurations

- 📁 [addons/](./modules/desktop/addons/) - Additional apps that are required for DE/WM ([example](https://wiki.archlinux.org/title/Desktop_environment#Custom_environments))
- 📁 [addons/](./modules/desktop/addons/) - Additional apps that are required for DE/WM ([example](https://wiki.archlinux.org/title/Desktop_environment#Custom_environments))

#### Basic module template
- `$1` - Module category *(example: apps, cli, desktop, addons)*
- `$2` - Module name *(example: firefox, vscodium, hyprland, waybar, rofi)*
```nix
{
config,
pkgs,
lib,
zenyte-lib,
configFolder,
...
}:
with lib
with zenyte-lib; let
cfg = config.zenyte.$1.$2;
in {
options.zenyte.$1.$2 = {
enable = mkBoolOpt false "Whether to enable $2.";
};
config = mkIf cfg.enable {
};
}
```

0 comments on commit d931b97

Please sign in to comment.