From 70acd5f83c8efaa75648307a93a2c75be7e6ea8c Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 28 Jul 2024 10:52:24 +0800 Subject: [PATCH] wrapper-manager-fds/docs: fix module options doc generation --- subprojects/wrapper-manager-fds/docs/default.nix | 2 +- .../docs/website/content/en/project-overview.adoc | 8 ++++---- subprojects/wrapper-manager-fds/docs/website/shell.nix | 4 ++-- .../modules/env/home-manager/default.nix | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/subprojects/wrapper-manager-fds/docs/default.nix b/subprojects/wrapper-manager-fds/docs/default.nix index fe66d43b..6b47b4be 100644 --- a/subprojects/wrapper-manager-fds/docs/default.nix +++ b/subprojects/wrapper-manager-fds/docs/default.nix @@ -16,7 +16,7 @@ let evalDoc = args@{ modules, includeModuleSystemOptions ? false, ... }: let options = (pkgs.lib.evalModules { - modules = modules ++ [ { _module.check = false; } ]; + modules = modules ++ [ { _module.check = false; _module.args.pkgs = pkgs; } ]; class = "wrapperManager"; }).options; in diff --git a/subprojects/wrapper-manager-fds/docs/website/content/en/project-overview.adoc b/subprojects/wrapper-manager-fds/docs/website/content/en/project-overview.adoc index 2a1bd0b4..b2e92e2b 100644 --- a/subprojects/wrapper-manager-fds/docs/website/content/en/project-overview.adoc +++ b/subprojects/wrapper-manager-fds/docs/website/content/en/project-overview.adoc @@ -50,7 +50,7 @@ Assuming you have already initialized npins, you can simply add wrapper-manager- [source, shell, subs="attributes+"] ---- -npins add github foo-dogsquared {github-repo} +npins add --name wrapper-manager github foo-dogsquared {github-repo} --branch main ---- Similar to channels installation, you'll have to import the <> object. @@ -129,8 +129,8 @@ Instead of a home environment from home-manager or an installation script from d This can be thought of as a declarative layer over `makeWrapper` build hook from nixpkgs. If you want to view the module options, you can see it in -ifdef::env-hugo[link:./nix-module-options/[wrapper-manager module options].] -ifndef::env-hugo[{docs-site}/nix-module-options[wrapper-manager documentation site].] +ifdef::env-hugo[link:./wrapper-manager-env-options/[wrapper-manager module options].] +ifndef::env-hugo[{docs-site}/wrapper-manager-env-options[wrapper-manager documentation site].] Here's a very simple example of a wrapper for Neofetch. @@ -360,7 +360,7 @@ It is also quicker to eyeball results in this way especially if you're always wo This project also has a website set up with https://gohugo.io/[Hugo]. The files that you need to see are in -ifdef::env-hugo[github:foo-dogsquared/wrapper-manager-fds[`docs`, rev=main, path=docs]] +ifdef::env-hugo[github:{github-full}[`docs`, rev=main, path=docs]] ifndef::env-hugo[link:./docs[`./docs`]] directory. diff --git a/subprojects/wrapper-manager-fds/docs/website/shell.nix b/subprojects/wrapper-manager-fds/docs/website/shell.nix index 529b9a1c..3a377027 100644 --- a/subprojects/wrapper-manager-fds/docs/website/shell.nix +++ b/subprojects/wrapper-manager-fds/docs/website/shell.nix @@ -6,10 +6,10 @@ in let docs = import ../. { inherit pkgs; }; in -with pkgs; mkShell { +pkgs.mkShell { inputsFrom = [ docs.website ]; - packages = [ + packages = with pkgs; [ nodePackages.prettier vscode-langservers-extracted ]; diff --git a/subprojects/wrapper-manager-fds/modules/env/home-manager/default.nix b/subprojects/wrapper-manager-fds/modules/env/home-manager/default.nix index 5562068a..3cc0a446 100644 --- a/subprojects/wrapper-manager-fds/modules/env/home-manager/default.nix +++ b/subprojects/wrapper-manager-fds/modules/env/home-manager/default.nix @@ -11,7 +11,7 @@ in config = lib.mkMerge [ { wrapper-manager.extraSpecialArgs.hmConfig = config; } - (lib.mkIf moduleArgs?nixosConfig { + (lib.mkIf (moduleArgs ? nixosConfig) { wrapper-manager.sharedModules = [ ({ lib, ... }: { # NixOS already has the option to set the locale so we don't need to