summaryrefslogtreecommitdiffstats
path: root/nixos/modules/installer/tools/tools.nix
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2023-08-12 13:13:14 +0300
committerDoron Behar <doron.behar@gmail.com>2023-08-12 18:01:06 +0300
commit32f75a0f2af55b50061629fd4e51221f15ada457 (patch)
tree83e8559ab2eddd545c70acc6ed0f732ba7e898b0 /nixos/modules/installer/tools/tools.nix
parent9d0bb6e67a4a1922fefc9c0a35bd5b1f0482aaac (diff)
nixos/install-tools: Add manpages to packages instead of seperating them
Since each such `nixos-*` tool has it's own derivation, exposed in pkgs, There is no point in separating the manuals from the packages. If someone wishes to have the tools without the manuals, they can use meta.outputsToInstall to disable the installation of the manpages of these packages. This Fixes #244450.
Diffstat (limited to 'nixos/modules/installer/tools/tools.nix')
-rw-r--r--nixos/modules/installer/tools/tools.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index 4dce4f998052..6564b583464a 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/nixos/modules/installer/tools/tools.nix
@@ -9,12 +9,19 @@ let
makeProg = args: pkgs.substituteAll (args // {
dir = "bin";
isExecutable = true;
+ nativeBuildInputs = [
+ pkgs.installShellFiles
+ ];
+ postInstall = ''
+ installManPage ${args.manPage}
+ '';
});
nixos-build-vms = makeProg {
name = "nixos-build-vms";
src = ./nixos-build-vms/nixos-build-vms.sh;
inherit (pkgs) runtimeShell;
+ manPage = ./manpages/nixos-build-vms.8;
};
nixos-install = makeProg {
@@ -27,6 +34,7 @@ let
nixos-enter
pkgs.util-linuxMinimal
];
+ manPage = ./manpages/nixos-install.8;
};
nixos-rebuild = pkgs.nixos-rebuild.override { nix = config.nix.package.out; };
@@ -40,6 +48,7 @@ let
btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
inherit (config.system.nixos-generate-config) configuration desktopConfiguration;
xserverEnabled = config.services.xserver.enable;
+ manPage = ./manpages/nixos-generate-config.8;
};
inherit (pkgs) nixos-option;
@@ -57,6 +66,7 @@ let
} // optionalAttrs (config.system.configurationRevision != null) {
configurationRevision = config.system.configurationRevision;
});
+ manPage = ./manpages/nixos-version.8;
};
nixos-enter = makeProg {
@@ -66,6 +76,7 @@ let
path = makeBinPath [
pkgs.util-linuxMinimal
];
+ manPage = ./manpages/nixos-enter.8;
};
in