mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-30 22:57:58 +00:00
wrapper-manager-fds/modules: add option for additional modules inclusion in documentation
This commit is contained in:
parent
d28a4c305d
commit
d7ea56adf3
@ -3,6 +3,7 @@ let
|
||||
in
|
||||
{
|
||||
pkgs ? import sources.nixos-unstable { },
|
||||
extraModules ? [ ],
|
||||
}:
|
||||
|
||||
let
|
||||
@ -62,7 +63,7 @@ let
|
||||
|
||||
wrapperManagerLib = (import ../. { }).lib;
|
||||
wmOptionsDoc = evalDoc {
|
||||
modules = [ ../modules/wrapper-manager ];
|
||||
modules = [ ../modules/wrapper-manager ] ++ extraModules;
|
||||
includeModuleSystemOptions = true;
|
||||
};
|
||||
|
||||
|
14
modules/env/common.nix
vendored
14
modules/env/common.nix
vendored
@ -135,6 +135,20 @@ in
|
||||
documentation = {
|
||||
manpage.enable = lib.mkEnableOption "manpage output";
|
||||
html.enable = lib.mkEnableOption "HTML output";
|
||||
|
||||
extraModules = lib.mkOption {
|
||||
type = with lib.types; listOf deferredModule;
|
||||
description = ''
|
||||
List of extra wrapper-manager modules to be included as part of the
|
||||
documentation.
|
||||
'';
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
./modules/wrapper-manager
|
||||
]
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
2
modules/env/home-manager/default.nix
vendored
2
modules/env/home-manager/default.nix
vendored
@ -7,7 +7,7 @@
|
||||
|
||||
let
|
||||
cfg = config.wrapper-manager;
|
||||
wmDocs = import ../../../docs { inherit pkgs; };
|
||||
wmDocs = import ../../../docs { inherit pkgs; inherit (cfg.documentation) extraModules; };
|
||||
in
|
||||
{
|
||||
imports = [ ../common.nix ];
|
||||
|
5
modules/env/nixos/default.nix
vendored
5
modules/env/nixos/default.nix
vendored
@ -7,7 +7,7 @@
|
||||
|
||||
let
|
||||
cfg = config.wrapper-manager;
|
||||
wmDocs = import ../../../docs { inherit pkgs; };
|
||||
wmDocs = import ../../../docs { inherit pkgs; inherit (cfg.documentation) extraModules; };
|
||||
in
|
||||
{
|
||||
imports = [ ../common.nix ];
|
||||
@ -33,7 +33,8 @@ in
|
||||
}
|
||||
|
||||
(lib.mkIf (cfg.packages != { }) {
|
||||
environment.systemPackages = lib.mapAttrsToList (_: wrapper: wrapper.build.toplevel) cfg.packages;
|
||||
environment.systemPackages =
|
||||
lib.mapAttrsToList (_: wrapper: wrapper.build.toplevel) cfg.packages;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user