docs: add generated scopedPackages readme
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2025-01-21 20:45:05 -05:00
parent 2598505dfd
commit fdbd5cb2df
4 changed files with 53 additions and 21 deletions

View file

@ -20,7 +20,6 @@ substituteAttrs() {
) -t markdown --template "$FLAKE/apps/gen-docs/templates/$1.md" -o "$FLAKE/$1/README.md"
}
# TODO: add overlays, scopedPackages
substitute "appsPackages" "apps" "getPackageMeta"
substitute "nixosConfigurations" "configurations" "getConfigMeta"
substitute "devShells" "devShells" "getPackageMeta"
@ -28,3 +27,6 @@ substitute "packages" "packages" "getPackageMeta"
substituteAttrs "modules"
substituteAttrs "homeManagerModules"
substituteAttrs "overlays"
# TODO: add metadata of all packages
substituteAttrs "scopedPackages"

View file

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

View file

@ -1,11 +1,13 @@
# ScopedPackages
This directory encompasses every derivation scopes for packages exposed by my flake.
This directory contains every package scopes exposed by this flake.
## List of package scopes found in `self.scopedPackages`
## List of my package scopes found in `self.scopedPackages`
| Name | Description |
| --------------- | ----------- |
| `dracula` | Themes for many apps from the [Dracula GitHub Org](https://github.com/dracula) |
| `firefoxAddons` | Firefox extensions updated with [mozilla-addons-to-nix](https://git.sr.ht/~rycee/mozilla-addons-to-nix) |
| `mpvScripts` | MPV scripts I use that are not in nixpkgs |
| ---- | ----------- |
| `dracula` | Custom derivations that each represent an app's Dracula Theme. |
| `firefoxAddons` | Every extensions I use in my firefox module. |
| `hass-components` | Components I use for Home-Assistant that aren't in nixpkgs. |
| `lovelace-components` | Lovelace components I use for Home-Assistant that aren't in nixpkgs. |
| `mpvScripts` | MPV scripts I use that aren't in nixpkgs. |

View file

@ -1,18 +1,35 @@
{
inputs,
mkVersion,
pkgs,
...
inputs ? {},
mkVersion ? {},
pkgs ? {},
description ? false,
}: let
inherit (pkgs) lib;
inherit (pkgs.lib) recurseIntoAttrs;
mkScope = file:
lib.recurseIntoAttrs
mkScope = file: desc:
if description
then desc
else
recurseIntoAttrs
(pkgs.callPackage file ({inherit mkVersion;} // inputs));
in {
dracula = mkScope ./dracula;
firefoxAddons = mkScope ./firefox-addons;
hass-components = mkScope ./hass-components;
lovelace-components = mkScope ./lovelace-components;
mpvScripts = mkScope ./mpv-scripts;
dracula = mkScope ./dracula ''
Custom derivations that each represent an app's Dracula Theme.
'';
firefoxAddons = mkScope ./firefox-addons ''
Every extensions I use in my firefox module.
'';
hass-components = mkScope ./hass-components ''
Components I use for Home-Assistant that aren't in nixpkgs.
'';
lovelace-components = mkScope ./lovelace-components ''
Lovelace components I use for Home-Assistant that aren't in nixpkgs.
'';
mpvScripts = mkScope ./mpv-scripts ''
MPV scripts I use that aren't in nixpkgs.
'';
}