summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2016-02-22 19:34:16 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2016-02-22 19:34:16 +0100
commit2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde (patch)
tree58c25b69d693f6740a607c8c359cd522509ec439 /nixos/modules/services
parent4d767deaf51bb9c29173f966a6f8c6062335fc9e (diff)
parentf57c049e0b114c156b6adb61738e7c5308a161d4 (diff)
downloadnixlib-2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde.tar
nixlib-2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde.tar.gz
nixlib-2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde.tar.bz2
nixlib-2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde.tar.lz
nixlib-2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde.tar.xz
nixlib-2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde.tar.zst
nixlib-2d5e6a27fc57a0f7e94efcdd3a2dada30ec22dde.zip
Merge pull request #13355 from grahamc/ttyNumberString-issue3608
nixos-manual: Accept numbers for ttyNumber, closes #3608
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/misc/nixos-manual.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
index 3e1f53e79f3e..79943a21224b 100644
--- a/nixos/modules/services/misc/nixos-manual.nix
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -72,7 +72,8 @@ in
     };
 
     services.nixosManual.ttyNumber = mkOption {
-      default = "8";
+      type = types.int;
+      default = 8;
       description = ''
         Virtual console on which to show the manual.
       '';
@@ -96,7 +97,7 @@ in
       [ manual.manual help ]
       ++ 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
       { "nixos-manual" =
@@ -106,7 +107,7 @@ in
             { ExecStart = "${cfg.browser} ${entry}";
               StandardInput = "tty";
               StandardOutput = "tty";
-              TTYPath = "/dev/tty${cfg.ttyNumber}";
+              TTYPath = "/dev/tty${toString cfg.ttyNumber}";
               TTYReset = true;
               TTYVTDisallocate = true;
               Restart = "always";