Merge pull request #13355 from grahamc/ttyNumberString-issue3608
nixos-manual: Accept numbers for ttyNumber, closes #3608
This commit is contained in:
commit
2d5e6a27fc
|
@ -72,7 +72,8 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nixosManual.ttyNumber = mkOption {
|
services.nixosManual.ttyNumber = mkOption {
|
||||||
default = "8";
|
type = types.int;
|
||||||
|
default = 8;
|
||||||
description = ''
|
description = ''
|
||||||
Virtual console on which to show the manual.
|
Virtual console on which to show the manual.
|
||||||
'';
|
'';
|
||||||
|
@ -96,7 +97,7 @@ in
|
||||||
[ manual.manual help ]
|
[ manual.manual help ]
|
||||||
++ optional config.programs.man.enable manual.manpages;
|
++ optional config.programs.man.enable manual.manpages;
|
||||||
|
|
||||||
boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"];
|
boot.extraTTYs = mkIf cfg.showManual ["tty${toString cfg.ttyNumber}"];
|
||||||
|
|
||||||
systemd.services = optionalAttrs cfg.showManual
|
systemd.services = optionalAttrs cfg.showManual
|
||||||
{ "nixos-manual" =
|
{ "nixos-manual" =
|
||||||
|
@ -106,7 +107,7 @@ in
|
||||||
{ ExecStart = "${cfg.browser} ${entry}";
|
{ ExecStart = "${cfg.browser} ${entry}";
|
||||||
StandardInput = "tty";
|
StandardInput = "tty";
|
||||||
StandardOutput = "tty";
|
StandardOutput = "tty";
|
||||||
TTYPath = "/dev/tty${cfg.ttyNumber}";
|
TTYPath = "/dev/tty${toString cfg.ttyNumber}";
|
||||||
TTYReset = true;
|
TTYReset = true;
|
||||||
TTYVTDisallocate = true;
|
TTYVTDisallocate = true;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
|
Loading…
Reference in New Issue