mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
41 lines
945 B
Nix
41 lines
945 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.wrapper-manager;
|
|
wmDocs = import ../../../docs { inherit pkgs; inherit (cfg.documentation) extraModules; };
|
|
in
|
|
{
|
|
imports = [ ../common.nix ];
|
|
|
|
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 = [
|
|
(
|
|
{ lib, ... }:
|
|
{
|
|
# NixOS already has the option to set the locale so we don't need to
|
|
# have this.
|
|
config.locale.enable = lib.mkDefault false;
|
|
}
|
|
)
|
|
];
|
|
}
|
|
|
|
(lib.mkIf (cfg.packages != { }) {
|
|
environment.systemPackages =
|
|
lib.mapAttrsToList (_: wrapper: wrapper.build.toplevel) cfg.packages;
|
|
})
|
|
];
|
|
}
|