diff --git a/etc/default.nix b/etc/default.nix index 6b15245e4cb..efb0ea1ee29 100644 --- a/etc/default.nix +++ b/etc/default.nix @@ -79,16 +79,6 @@ let target = "hosts"; } - { # Friendly greeting on the virtual consoles. - source = pkgs.writeText "issue" '' - - ${config.services.mingetty.greetingLine} - ${config.services.mingetty.helpLine} - - ''; - target = "issue"; - } - { # Configuration for pwdutils (login, passwd, useradd, etc.). # You cannot login without it! source = ./login.defs; diff --git a/modules/services/ttys/mingetty.nix b/modules/services/ttys/mingetty.nix index c04d47061e9..abca6a9784b 100644 --- a/modules/services/ttys/mingetty.nix +++ b/modules/services/ttys/mingetty.nix @@ -61,14 +61,24 @@ in options ]; - services = { - extraJobs = map (ttyNumber : { - name = "tty" + toString ttyNumber; - job = " - start on udev - stop on shutdown - respawn ${mingetty}/sbin/mingetty --loginprog=${loginProgram} --noclear tty${toString ttyNumber} - "; - }) ttyNumbers; - }; + services.extraJobs = map (ttyNumber : { + name = "tty" + toString ttyNumber; + job = '' + start on udev + stop on shutdown + respawn ${mingetty}/sbin/mingetty --loginprog=${loginProgram} --noclear tty${toString ttyNumber} + ''; + }) ttyNumbers; + + environment.etc = + [ { # Friendly greeting on the virtual consoles. + source = pkgs.writeText "issue" '' + + ${config.services.mingetty.greetingLine} + ${config.services.mingetty.helpLine} + + ''; + target = "issue"; + } + ]; }