2024-07-31 08:51:25 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2024-07-02 11:30:47 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.wrapper-manager;
|
2024-07-31 08:51:25 +00:00
|
|
|
wmDocs = import ../../../docs { inherit pkgs; };
|
2024-07-02 11:30:47 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../common.nix
|
|
|
|
];
|
|
|
|
|
2024-07-03 15:18:26 +00:00
|
|
|
config = lib.mkMerge [
|
2024-07-27 04:18:41 +00:00
|
|
|
{
|
2024-07-31 08:51:25 +00:00
|
|
|
environment.systemPackages =
|
|
|
|
lib.optionals cfg.documentation.manpage.enable [ wmDocs.outputs.manpage ]
|
|
|
|
++ lib.optionals cfg.documentation.html.enable [ wmDocs.outputs.html ];
|
|
|
|
|
2024-07-27 04:18:41 +00:00
|
|
|
wrapper-manager.extraSpecialArgs.nixosConfig = config;
|
|
|
|
|
|
|
|
wrapper-manager.sharedModules = [
|
|
|
|
({ lib, ... }: {
|
|
|
|
# NixOS already has the option to set the locale so we don't need to
|
|
|
|
# have this.
|
|
|
|
config.locale.enable = lib.mkDefault false;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|
2024-07-02 11:30:47 +00:00
|
|
|
|
2024-07-08 13:12:31 +00:00
|
|
|
(lib.mkIf (cfg.packages != {}) {
|
2024-07-03 15:18:26 +00:00
|
|
|
environment.systemPackages =
|
2024-07-08 13:12:31 +00:00
|
|
|
lib.mapAttrsToList (_: wrapper: wrapper.build.toplevel) cfg.packages;
|
2024-07-03 15:18:26 +00:00
|
|
|
})
|
|
|
|
];
|
2024-07-02 11:30:47 +00:00
|
|
|
}
|