forked from mirrors/nixpkgs
services/misc/nixos-manual.nix: Remove
Running the manual on a TTY is useless in the graphical ISOs and not particularly useful in non-graphical ISOs (since you can also run 'nixos-help'). Fixes #83157.
This commit is contained in:
parent
50281a823f
commit
aebf9a4709
|
@ -24,8 +24,7 @@
|
|||
</para>
|
||||
|
||||
<para>
|
||||
The NixOS manual is available on virtual console 8 (press Alt+F8 to access)
|
||||
or by running <command>nixos-help</command>.
|
||||
The NixOS manual is available by running <command>nixos-help</command>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
|
|
@ -218,9 +218,7 @@ in
|
|||
++ optionals config.services.xserver.enable [ desktopItem pkgs.nixos-icons ]);
|
||||
|
||||
services.mingetty.helpLine = mkIf cfg.doc.enable (
|
||||
"\nRun `nixos-help` "
|
||||
+ optionalString config.services.nixosManual.showManual "or press <Alt-F${toString config.services.nixosManual.ttyNumber}> "
|
||||
+ "for the NixOS manual."
|
||||
"\nRun 'nixos-help' for the NixOS manual."
|
||||
);
|
||||
})
|
||||
|
||||
|
|
|
@ -469,7 +469,6 @@
|
|||
./services/misc/nix-daemon.nix
|
||||
./services/misc/nix-gc.nix
|
||||
./services/misc/nix-optimise.nix
|
||||
./services/misc/nixos-manual.nix
|
||||
./services/misc/nix-ssh-serve.nix
|
||||
./services/misc/novacomd.nix
|
||||
./services/misc/nzbget.nix
|
||||
|
|
|
@ -26,7 +26,6 @@ with lib;
|
|||
|
||||
# Show the manual.
|
||||
documentation.nixos.enable = mkForce true;
|
||||
services.nixosManual.showManual = true;
|
||||
|
||||
# Let the user play Rogue on TTY 8 during the installation.
|
||||
#services.rogue.enable = true;
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
# This module optionally starts a browser that shows the NixOS manual
|
||||
# on one of the virtual consoles which is useful for the installation
|
||||
# CD.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.nixosManual;
|
||||
cfgd = config.documentation;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
# TODO(@oxij): rename this to `.enable` eventually.
|
||||
services.nixosManual.showManual = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to show the NixOS manual on one of the virtual
|
||||
consoles.
|
||||
'';
|
||||
};
|
||||
|
||||
services.nixosManual.ttyNumber = mkOption {
|
||||
type = types.int;
|
||||
default = 8;
|
||||
description = ''
|
||||
Virtual console on which to show the manual.
|
||||
'';
|
||||
};
|
||||
|
||||
services.nixosManual.browser = mkOption {
|
||||
type = types.path;
|
||||
default = "${pkgs.w3m-nographics}/bin/w3m";
|
||||
description = ''
|
||||
Browser used to show the manual.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.showManual {
|
||||
assertions = singleton {
|
||||
assertion = cfgd.enable && cfgd.nixos.enable;
|
||||
message = "Can't enable `services.nixosManual.showManual` without `documentation.nixos.enable`";
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.showManual && cfgd.enable && cfgd.nixos.enable) {
|
||||
console.extraTTYs = [ "tty${toString cfg.ttyNumber}" ];
|
||||
|
||||
systemd.services.nixos-manual = {
|
||||
description = "NixOS Manual";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.browser} ${config.system.build.manual.manualHTMLIndex}";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
TTYPath = "/dev/tty${toString cfg.ttyNumber}";
|
||||
TTYReset = true;
|
||||
TTYVTDisallocate = true;
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
}
|
Loading…
Reference in a new issue