@ -4,7 +4,7 @@ with lib;
let
autologinArg = optionalString ( config . services . min getty. autologinUser != null ) " - - a u t o l o g i n ${ config . services . min getty. autologinUser } " ;
autologinArg = optionalString ( config . services . getty . autologinUser != null ) " - - a u t o l o g i n ${ config . services . getty . autologinUser } " ;
gettyCmd = extraArgs : " @ ${ pkgs . util-linux } / s b i n / a g e t t y a g e t t y - - l o g i n - p r o g r a m ${ pkgs . shadow } / b i n / l o g i n ${ autologinArg } ${ extraArgs } " ;
in
@ -13,9 +13,13 @@ in
###### interface
imports = [
( mkRenamedOptionModule [ " s e r v i c e s " " m i n g e t t y " ] [ " s e r v i c e s " " g e t t y " ] )
] ;
options = {
services . mingetty = {
services . getty = {
autologinUser = mkOption {
type = types . nullOr types . str ;
@ -29,7 +33,7 @@ in
greetingLine = mkOption {
type = types . str ;
description = ''
Welcome line printed by min getty.
Welcome line printed by a getty.
The default shows current NixOS version label , machine type and tty .
'' ;
} ;
@ -38,7 +42,7 @@ in
type = types . lines ;
default = " " ;
description = ''
Help line printed by min getty below the welcome line .
Help line printed by a getty below the welcome line .
Used by the installation CD to give some hints on
how to proceed .
'' ;
@ -65,7 +69,7 @@ in
config = {
# Note: this is set here rather than up there so that changing
# nixos.label would not rebuild manual pages
services . min getty. greetingLine = mkDefault '' < < < W e l c o m e t o N i x O S ${ config . system . nixos . label } ( \ m ) - \ l > > > '' ;
services . getty . greetingLine = mkDefault '' < < < W e l c o m e t o N i x O S ${ config . system . nixos . label } ( \ m ) - \ l > > > '' ;
systemd . services . " g e t t y @ " =
{ serviceConfig . ExecStart = [
@ -76,7 +80,7 @@ in
} ;
systemd . services . " s e r i a l - g e t t y @ " =
let speeds = concatStringsSep " , " ( map toString config . services . min getty. serialSpeed ) ; in
let speeds = concatStringsSep " , " ( map toString config . services . getty . serialSpeed ) ; in
{ serviceConfig . ExecStart = [
" " # override upstream default with an empty ExecStart
( gettyCmd " % I ${ speeds } $ T E R M " )
@ -106,8 +110,8 @@ in
{ # Friendly greeting on the virtual consoles.
source = pkgs . writeText " i s s u e " ''
[ 1 ; 3 2 m $ { config . services . min getty. greetingLine } [ 0 m
$ { config . services . min getty. helpLine }
[ 1 ; 3 2 m $ { config . services . getty . greetingLine } [ 0 m
$ { config . services . getty . helpLine }
'' ;
} ;