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

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

@ -129,7 +129,7 @@
nixosModules = import ./modules {inherit self;}; nixosModules = import ./modules {inherit self;};
overlays = import ./overlays self; overlays = import ./overlays {inherit self;};
apps = apps =
perSystem (pkgs: perSystem (pkgs:

View file

@ -1,4 +1,4 @@
# apps # Apps
This directory contains every derivations for apps exposed by this flake. 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 | | Name | Description |
| ---- | ----------- | | ---- | ----------- |
| `app-extract-subs` | Extract all `srt` subtitle files from a `mkv` video with the appropriate name. | | `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. | | `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. | | `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" ) -t markdown --template "$FLAKE/apps/gen-docs/templates/$2.md" -o "$FLAKE/$2/README.md"
} }
substituteModule() { substituteAttrs() {
echo '' | pandoc --metadata-file <( echo '' | pandoc --metadata-file <(
nix eval \ nix eval \
--impure \ --impure \
--json \ --json \
--expr "\"$FLAKE\"" \ --expr "\"$FLAKE\"" \
--apply "(import \"$FLAKE/apps/gen-docs/getModuleMeta.nix\") \"$1\"" | --apply "(import \"$FLAKE/apps/gen-docs/getAttrsMeta.nix\") \"$1\"" |
jq -r jq -r
) -t markdown --template "$FLAKE/apps/gen-docs/templates/$1.md" -o "$FLAKE/$1/README.md" ) -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 "nixosConfigurations" "configurations" "getConfigMeta"
substitute "devShells" "devShells" "getPackageMeta" substitute "devShells" "devShells" "getPackageMeta"
substitute "packages" "packages" "getPackageMeta" substitute "packages" "packages" "getPackageMeta"
substituteModule "modules" substituteAttrs "modules"
substituteModule "homeManagerModules" substituteAttrs "homeManagerModules"
substituteAttrs "overlays"

View file

@ -1,4 +1,4 @@
# apps # Apps
This directory contains every derivations for apps exposed by this flake. 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 This directory contains every device's main configuration file, their `hardware-configuration.nix` and some custom modules
unique to them. unique to them.

View file

@ -1,4 +1,4 @@
# devShells # DevShells
This directory contains every derivations for devShells exposed by this flake. 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. 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. 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$

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 This directory contains every device's main configuration file, their `hardware-configuration.nix` and some custom modules
unique to them. unique to them.

View file

@ -1,4 +1,4 @@
# devShells # DevShells
This directory contains every derivations for devShells exposed by this flake. 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. This directory contains every home-manager modules exposed by this flake.

View file

@ -1,3 +1,4 @@
# TODO: add README
let let
inherit (import ./lib.nix) mkDep mkInput mkHyprDep mkSrc; inherit (import ./lib.nix) mkDep mkInput mkHyprDep mkSrc;
inherit (builtins) listToAttrs map removeAttrs; inherit (builtins) listToAttrs map removeAttrs;

View file

@ -1,4 +1,4 @@
# TODO: add README and document lib # TODO: add README and document functions
{ {
perSystem, perSystem,
inputs, inputs,

View file

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

11
overlays/README.md Normal file
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 |
| ---- | ----------- |
| `misc-fixes` | Fixes build failures, missing meta attributes, evaluation failures, etc. of the current `nixpkgs` revision of this flake. |
| `nix-version` | Overrides the nix package for everything so I don't need multiple versions. |
| `xdg-desktop-portal-kde` | Fixes this issue: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/issues/15 |

View file

@ -1,5 +1,31 @@
self: { {
misc-fixes = import ./misc-fixes; self ? {},
nix-version = import ./nix-version self; description ? false,
xdg-desktop-portal-kde = import ./xdg-desktop-portal-kde; }: let
overlay = mod: desc:
if description
then desc
else mod;
in {
misc-fixes =
overlay
(import ./misc-fixes)
''
Fixes build failures, missing meta attributes, evaluation failures, etc.
of the current `nixpkgs` revision of this flake.
'';
nix-version =
overlay
(import ./nix-version self)
''
Overrides the nix package for everything so I don't need multiple versions.
'';
xdg-desktop-portal-kde =
overlay
(import ./xdg-desktop-portal-kde)
''
Fixes this issue: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/issues/15
'';
} }