mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
wrapper-manager-fds/modules/env: add options to add documentation packages
This commit is contained in:
parent
9626b2c952
commit
3aa48b27ca
@ -119,5 +119,14 @@ in
|
||||
yourMomName = "Joe Mama";
|
||||
};
|
||||
};
|
||||
|
||||
# They're all disabled by default to let wrapper-manager not get out of the
|
||||
# way. wrapper-manager configurations are meant to be a part of other
|
||||
# environments and we're trying not to make a spotlight for wrapper-manager
|
||||
# in whatever form including exporting the documentation.
|
||||
documentation = {
|
||||
manpage.enable = lib.mkEnableOption "manpage output";
|
||||
html.enable = lib.mkEnableOption "HTML output";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{ config, lib, ... }@moduleArgs:
|
||||
{ config, lib, pkgs, ... }@moduleArgs:
|
||||
|
||||
let
|
||||
cfg = config.wrapper-manager;
|
||||
wmDocs = import ../../../docs { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@ -9,7 +10,13 @@ in
|
||||
];
|
||||
|
||||
config = lib.mkMerge [
|
||||
{ wrapper-manager.extraSpecialArgs.hmConfig = config; }
|
||||
{
|
||||
home.packages =
|
||||
lib.optionals cfg.documentation.manpage.enable [ wmDocs.outputs.manpage ]
|
||||
++ lib.optionals cfg.documentation.html.enable [ wmDocs.outputs.html ];
|
||||
|
||||
wrapper-manager.extraSpecialArgs.hmConfig = config;
|
||||
}
|
||||
|
||||
(lib.mkIf (moduleArgs ? nixosConfig) {
|
||||
wrapper-manager.sharedModules = [
|
||||
|
@ -1,7 +1,8 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.wrapper-manager;
|
||||
wmDocs = import ../../../docs { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@ -10,6 +11,10 @@ in
|
||||
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages =
|
||||
lib.optionals cfg.documentation.manpage.enable [ wmDocs.outputs.manpage ]
|
||||
++ lib.optionals cfg.documentation.html.enable [ wmDocs.outputs.html ];
|
||||
|
||||
wrapper-manager.extraSpecialArgs.nixosConfig = config;
|
||||
|
||||
wrapper-manager.sharedModules = [
|
||||
|
Loading…
Reference in New Issue
Block a user