docs: add generated overlays readme
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
bea7a1e274
commit
2598505dfd
18 changed files with 73 additions and 23 deletions
|
@ -129,7 +129,7 @@
|
|||
|
||||
nixosModules = import ./modules {inherit self;};
|
||||
|
||||
overlays = import ./overlays self;
|
||||
overlays = import ./overlays {inherit self;};
|
||||
|
||||
apps =
|
||||
perSystem (pkgs:
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# apps
|
||||
# Apps
|
||||
|
||||
This directory contains every derivations for apps exposed by this flake.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# devShells
|
||||
# DevShells
|
||||
|
||||
This directory contains every derivations for devShells exposed by this flake.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# homeManagerModules
|
||||
# HomeManagerModules
|
||||
|
||||
This directory contains every home-manager modules exposed by this flake.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# nixosModules
|
||||
# NixosModules
|
||||
|
||||
This directory contains every modules for NixOS exposed by this flake.
|
||||
|
||||
|
|
11
apps/gen-docs/templates/overlays.md
Normal file
11
apps/gen-docs/templates/overlays.md
Normal 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$
|
|
@ -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.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# devShells
|
||||
# DevShells
|
||||
|
||||
This directory contains every derivations for devShells exposed by this flake.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# homeManagerModules
|
||||
# HomeManagerModules
|
||||
|
||||
This directory contains every home-manager modules exposed by this flake.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# TODO: add README
|
||||
let
|
||||
inherit (import ./lib.nix) mkDep mkInput mkHyprDep mkSrc;
|
||||
inherit (builtins) listToAttrs map removeAttrs;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# TODO: add README and document lib
|
||||
# TODO: add README and document functions
|
||||
{
|
||||
perSystem,
|
||||
inputs,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# nixosModules
|
||||
# NixosModules
|
||||
|
||||
This directory contains every modules for NixOS exposed by this flake.
|
||||
|
||||
|
|
11
overlays/README.md
Normal file
11
overlays/README.md
Normal 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 |
|
|
@ -1,5 +1,31 @@
|
|||
self: {
|
||||
misc-fixes = import ./misc-fixes;
|
||||
nix-version = import ./nix-version self;
|
||||
xdg-desktop-portal-kde = import ./xdg-desktop-portal-kde;
|
||||
{
|
||||
self ? {},
|
||||
description ? false,
|
||||
}: 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
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue