mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
add programs.man module
Note: this doesn't add man to systemPackages by default, only man-old builds on darwin and the system version works fine.
This commit is contained in:
parent
1546ea0617
commit
b6af291c84
3 changed files with 29 additions and 1 deletions
|
@ -44,6 +44,7 @@ let
|
||||||
./modules/services/nix-gc.nix
|
./modules/services/nix-gc.nix
|
||||||
./modules/programs/bash.nix
|
./modules/programs/bash.nix
|
||||||
./modules/programs/fish.nix
|
./modules/programs/fish.nix
|
||||||
|
./modules/programs/man.nix
|
||||||
./modules/programs/nix-script.nix
|
./modules/programs/nix-script.nix
|
||||||
./modules/programs/tmux.nix
|
./modules/programs/tmux.nix
|
||||||
./modules/programs/vim.nix
|
./modules/programs/vim.nix
|
||||||
|
|
|
@ -51,7 +51,7 @@ in {
|
||||||
|
|
||||||
environment.extraOutputsToInstall = mkOption {
|
environment.extraOutputsToInstall = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [ "man" ];
|
default = [];
|
||||||
example = [ "doc" "info" "devdoc" ];
|
example = [ "doc" "info" "devdoc" ];
|
||||||
description = "List of additional package outputs to be symlinked into <filename>/run/current-system/sw</filename>.";
|
description = "List of additional package outputs to be symlinked into <filename>/run/current-system/sw</filename>.";
|
||||||
};
|
};
|
||||||
|
|
27
modules/programs/man.nix
Normal file
27
modules/programs/man.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
|
||||||
|
programs.man.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Whether to enable manual pages and the <command>man</command> command.
|
||||||
|
This also includes "man" outputs of all <literal>systemPackages</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
config = mkIf config.programs.man.enable {
|
||||||
|
|
||||||
|
environment.pathsToLink = [ "/share/man" ];
|
||||||
|
|
||||||
|
environment.extraOutputsToInstall = [ "man" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue