feat(readme): add headings and descriptions to text.readme

This commit is contained in:
Mohammad Rafiq 2025-07-05 04:53:59 +08:00
parent 9b54a02eaa
commit 145200480d
No known key found for this signature in database
4 changed files with 29 additions and 13 deletions

View file

@ -1,9 +1,13 @@
# readme # Pantheon
## generated-files This flake serves as a monorepo for my systems (using IaC), dotfiles, and scripts.
## Generated Files
This flake uses the [files flake-parts module](https://flake.parts/options/files.html) to generate documentation. This flake uses the [files flake-parts module](https://flake.parts/options/files.html) to generate documentation.
The list of generated files are: The list of generated files are:
- [docs/cheatsheet.md](docs/cheatsheet.md) - [docs/cheatsheet.md](docs/cheatsheet.md)
- [README.md](README.md) - [README.md](README.md)
## helpers ## Helpers
### text-helper The following are some helpers for the repo as a whole.
The option `text.<name> supports either a string or a submodule with attributes order and parts. The parts attribute can either be a string, which will get concatenated in the order laid out in `text.<name>.order`, or can itself have the attributes order and parts, in which case it will be evaluated recursively. ### Generating Text
The option `text.<name>` supports either a string or a submodule with attributes order and parts.
The parts attribute can either be a string, which will get concatenated in the order laid out in `text.<name>.order`, or can itself have the attributes order and parts, in which case it will be evaluated recursively.

View file

@ -3,11 +3,21 @@ let
inherit (lib) singleton; inherit (lib) singleton;
in in
{ {
text.readme.order = [ text.readme = {
"generated-files" heading = "Pantheon";
"helpers" description = ''
]; This flake serves as a monorepo for my systems (using IaC), dotfiles, and scripts.
text.readme.parts.helpers.order = [ "text-helper" ]; '';
order = [
"Generated Files"
"helpers"
];
parts.helpers = {
heading = "Helpers";
description = "The following are some helpers for the repo as a whole.";
order = [ "Generating Text" ];
};
};
perSystem = perSystem =
{ pkgs, ... }: { pkgs, ... }:

View file

@ -17,7 +17,7 @@ in
perSystem = psArgs: { perSystem = psArgs: {
make-shells.default.packages = [ psArgs.config.files.writer.drv ]; make-shells.default.packages = [ psArgs.config.files.writer.drv ];
}; };
text.readme.parts.generated-files = concatStringsSep "\n" ( text.readme.parts."Generated Files" = concatStringsSep "\n" (
[ [
"This flake uses the [files flake-parts module](https://flake.parts/options/files.html) to generate documentation." "This flake uses the [files flake-parts module](https://flake.parts/options/files.html) to generate documentation."

View file

@ -70,6 +70,8 @@ in
name: value: concatStringsSep "\n" (flatten (mkListFromAttrs 1 { inherit name value; })) name: value: concatStringsSep "\n" (flatten (mkListFromAttrs 1 { inherit name value; }))
); );
}; };
config.text.readme.parts.helpers.parts.text-helper = config.text.readme.parts.helpers.parts."Generating Text" =
"The option `text.<name> supports either a string or a submodule with attributes order and parts. The parts attribute can either be a string, which will get concatenated in the order laid out in `text.<name>.order`, or can itself have the attributes order and parts, in which case it will be evaluated recursively."; ''
The option `text.<name>` supports either a string or a submodule with attributes order and parts.
The parts attribute can either be a string, which will get concatenated in the order laid out in `text.<name>.order`, or can itself have the attributes order and parts, in which case it will be evaluated recursively.'';
} }