mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-31 04:58:17 +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
|
in
|
||||||
{
|
{
|
||||||
pkgs ? import sources.nixos-unstable { },
|
pkgs ? import sources.nixos-unstable { },
|
||||||
|
extraModules ? [ ],
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -62,7 +63,7 @@ let
|
|||||||
|
|
||||||
wrapperManagerLib = (import ../. { }).lib;
|
wrapperManagerLib = (import ../. { }).lib;
|
||||||
wmOptionsDoc = evalDoc {
|
wmOptionsDoc = evalDoc {
|
||||||
modules = [ ../modules/wrapper-manager ];
|
modules = [ ../modules/wrapper-manager ] ++ extraModules;
|
||||||
includeModuleSystemOptions = true;
|
includeModuleSystemOptions = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
14
modules/env/common.nix
vendored
14
modules/env/common.nix
vendored
@ -135,6 +135,20 @@ in
|
|||||||
documentation = {
|
documentation = {
|
||||||
manpage.enable = lib.mkEnableOption "manpage output";
|
manpage.enable = lib.mkEnableOption "manpage output";
|
||||||
html.enable = lib.mkEnableOption "HTML 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
|
let
|
||||||
cfg = config.wrapper-manager;
|
cfg = config.wrapper-manager;
|
||||||
wmDocs = import ../../../docs { inherit pkgs; };
|
wmDocs = import ../../../docs { inherit pkgs; inherit (cfg.documentation) extraModules; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../common.nix ];
|
imports = [ ../common.nix ];
|
||||||
|
5
modules/env/nixos/default.nix
vendored
5
modules/env/nixos/default.nix
vendored
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.wrapper-manager;
|
cfg = config.wrapper-manager;
|
||||||
wmDocs = import ../../../docs { inherit pkgs; };
|
wmDocs = import ../../../docs { inherit pkgs; inherit (cfg.documentation) extraModules; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../common.nix ];
|
imports = [ ../common.nix ];
|
||||||
@ -33,7 +33,8 @@ in
|
|||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (cfg.packages != { }) {
|
(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