summary refs log tree commit diff
path: root/nixos/modules/services/ttys
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2014-08-25 02:45:11 +0200
committerJaka Hudoklin <jakahudoklin@gmail.com>2014-08-25 03:29:07 +0200
commita4ac9eb22e5559e7def4f58ea96837023aeae8bd (patch)
tree50628faff99e09965ef75dce9bdf7aabbecf39cd /nixos/modules/services/ttys
parent2a6c7e2874a3ada9b1c544db61402e03091556db (diff)
downloadnixlib-a4ac9eb22e5559e7def4f58ea96837023aeae8bd.tar
nixlib-a4ac9eb22e5559e7def4f58ea96837023aeae8bd.tar.gz
nixlib-a4ac9eb22e5559e7def4f58ea96837023aeae8bd.tar.bz2
nixlib-a4ac9eb22e5559e7def4f58ea96837023aeae8bd.tar.lz
nixlib-a4ac9eb22e5559e7def4f58ea96837023aeae8bd.tar.xz
nixlib-a4ac9eb22e5559e7def4f58ea96837023aeae8bd.tar.zst
nixlib-a4ac9eb22e5559e7def4f58ea96837023aeae8bd.zip
nixos: add systemd service for getty on /dev/console
Diffstat (limited to 'nixos/modules/services/ttys')
-rw-r--r--nixos/modules/services/ttys/agetty.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/services/ttys/agetty.nix b/nixos/modules/services/ttys/agetty.nix
index df21ebbd9743..3878b02b1a84 100644
--- a/nixos/modules/services/ttys/agetty.nix
+++ b/nixos/modules/services/ttys/agetty.nix
@@ -66,6 +66,12 @@ with lib;
         restartIfChanged = false;
       };
 
+    systemd.services."console-getty" =
+      { serviceConfig.ExecStart = "@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login --keep-baud console 115200,38400,9600 $TERM";
+        serviceConfig.Restart = "always";
+        restartIfChanged = false;
+      };
+
     environment.etc = singleton
       { # Friendly greeting on the virtual consoles.
         source = pkgs.writeText "issue" ''