docs: add generated overlays readme

This commit is contained in:
matt1432 2025-01-21 17:05:47 -05:00
parent bea7a1e274
commit 2598505dfd
18 changed files with 73 additions and 23 deletions

View file

@ -1,4 +1,4 @@
# apps
# Apps
This directory contains every derivations for apps exposed by this flake.
@ -6,6 +6,6 @@ This directory contains every derivations for apps exposed by this flake.
| Name | Description |
| ---- | ----------- |
| `app-extract-subs` | Extract all `srt` subtitle files from a `mkv` video with the appropriate name. |
| `app-gen-docs` | Generates the READMEs in this repository from nix attributes. |
| `app-update-sources` | Updates all derivation sources in this repository and generates a commit message for the changes made. |
| `extract-subs` | Extract all `srt` subtitle files from a `mkv` video with the appropriate name. |
| `gen-docs` | Generates the READMEs in this repository from nix attributes. |
| `update-sources` | Updates all derivation sources in this repository and generates a commit message for the changes made. |

View file

@ -9,13 +9,13 @@ substitute() {
) -t markdown --template "$FLAKE/apps/gen-docs/templates/$2.md" -o "$FLAKE/$2/README.md"
}
substituteModule() {
substituteAttrs() {
echo '' | pandoc --metadata-file <(
nix eval \
--impure \
--json \
--expr "\"$FLAKE\"" \
--apply "(import \"$FLAKE/apps/gen-docs/getModuleMeta.nix\") \"$1\"" |
--apply "(import \"$FLAKE/apps/gen-docs/getAttrsMeta.nix\") \"$1\"" |
jq -r
) -t markdown --template "$FLAKE/apps/gen-docs/templates/$1.md" -o "$FLAKE/$1/README.md"
}
@ -25,5 +25,6 @@ substitute "appsPackages" "apps" "getPackageMeta"
substitute "nixosConfigurations" "configurations" "getConfigMeta"
substitute "devShells" "devShells" "getPackageMeta"
substitute "packages" "packages" "getPackageMeta"
substituteModule "modules"
substituteModule "homeManagerModules"
substituteAttrs "modules"
substituteAttrs "homeManagerModules"
substituteAttrs "overlays"

View file

@ -1,4 +1,4 @@
# apps
# Apps
This directory contains every derivations for apps exposed by this flake.

View file

@ -1,4 +1,4 @@
# nixosConfigurations
# NixosConfigurations
This directory contains every device's main configuration file, their `hardware-configuration.nix` and some custom modules
unique to them.

View file

@ -1,4 +1,4 @@
# devShells
# DevShells
This directory contains every derivations for devShells exposed by this flake.

View file

@ -1,4 +1,4 @@
# homeManagerModules
# HomeManagerModules
This directory contains every home-manager modules exposed by this flake.

View file

@ -1,4 +1,4 @@
# nixosModules
# NixosModules
This directory contains every modules for NixOS exposed by this flake.

View file

@ -0,0 +1,11 @@
# Overlays
This directory contains every overlay exposed by this flake.
## List of my overlays found in `self.overlays`
| Name | Description |
| ---- | ----------- |
$for(attrs/pairs)$
| `$it.key$` | $it.value.desc/nowrap$ |
$endfor$