mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #108465 from alyssais/getty
nixos/getty: rename from services.mingetty
This commit is contained in:
commit
57e1a17ad0
8 changed files with 20 additions and 16 deletions
|
@ -104,7 +104,7 @@ in
|
|||
'';
|
||||
|
||||
# Some more help text.
|
||||
services.mingetty.helpLine =
|
||||
services.getty.helpLine =
|
||||
''
|
||||
|
||||
Log in as "root" with an empty password. ${
|
||||
|
|
|
@ -122,7 +122,7 @@ in
|
|||
device = "/dev/something";
|
||||
};
|
||||
|
||||
services.mingetty = {
|
||||
services.getty = {
|
||||
# Some more help text.
|
||||
helpLine = ''
|
||||
Log in as "root" with an empty password. ${
|
||||
|
|
|
@ -261,7 +261,7 @@ in
|
|||
++ optionals cfg.doc.enable ([ manual.manualHTML nixos-help ]
|
||||
++ optionals config.services.xserver.enable [ pkgs.nixos-icons ]);
|
||||
|
||||
services.mingetty.helpLine = mkIf cfg.doc.enable (
|
||||
services.getty.helpLine = mkIf cfg.doc.enable (
|
||||
"\nRun 'nixos-help' for the NixOS manual."
|
||||
);
|
||||
})
|
||||
|
|
|
@ -852,7 +852,7 @@
|
|||
./services/torrent/peerflix.nix
|
||||
./services/torrent/rtorrent.nix
|
||||
./services/torrent/transmission.nix
|
||||
./services/ttys/agetty.nix
|
||||
./services/ttys/getty.nix
|
||||
./services/ttys/gpm.nix
|
||||
./services/ttys/kmscon.nix
|
||||
./services/wayland/cage.nix
|
||||
|
|
|
@ -45,10 +45,10 @@ with lib;
|
|||
};
|
||||
|
||||
# Automatically log in at the virtual consoles.
|
||||
services.mingetty.autologinUser = "nixos";
|
||||
services.getty.autologinUser = "nixos";
|
||||
|
||||
# Some more help text.
|
||||
services.mingetty.helpLine = ''
|
||||
services.getty.helpLine = ''
|
||||
The "nixos" and "root" accounts have empty passwords.
|
||||
|
||||
An ssh daemon is running. You then must set a password
|
||||
|
|
|
@ -4,7 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
autologinArg = optionalString (config.services.mingetty.autologinUser != null) "--autologin ${config.services.mingetty.autologinUser}";
|
||||
autologinArg = optionalString (config.services.getty.autologinUser != null) "--autologin ${config.services.getty.autologinUser}";
|
||||
gettyCmd = extraArgs: "@${pkgs.util-linux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login ${autologinArg} ${extraArgs}";
|
||||
|
||||
in
|
||||
|
@ -13,9 +13,13 @@ in
|
|||
|
||||
###### interface
|
||||
|
||||
imports = [
|
||||
(mkRenamedOptionModule [ "services" "mingetty" ] [ "services" "getty" ])
|
||||
];
|
||||
|
||||
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 mingetty.
|
||||
Welcome line printed by agetty.
|
||||
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 mingetty below the welcome line.
|
||||
Help line printed by agetty 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.mingetty.greetingLine = mkDefault ''<<< Welcome to NixOS ${config.system.nixos.label} (\m) - \l >>>'';
|
||||
services.getty.greetingLine = mkDefault ''<<< Welcome to NixOS ${config.system.nixos.label} (\m) - \l >>>'';
|
||||
|
||||
systemd.services."getty@" =
|
||||
{ serviceConfig.ExecStart = [
|
||||
|
@ -76,7 +80,7 @@ in
|
|||
};
|
||||
|
||||
systemd.services."serial-getty@" =
|
||||
let speeds = concatStringsSep "," (map toString config.services.mingetty.serialSpeed); in
|
||||
let speeds = concatStringsSep "," (map toString config.services.getty.serialSpeed); in
|
||||
{ serviceConfig.ExecStart = [
|
||||
"" # override upstream default with an empty ExecStart
|
||||
(gettyCmd "%I ${speeds} $TERM")
|
||||
|
@ -106,8 +110,8 @@ in
|
|||
{ # Friendly greeting on the virtual consoles.
|
||||
source = pkgs.writeText "issue" ''
|
||||
|
||||
[1;32m${config.services.mingetty.greetingLine}[0m
|
||||
${config.services.mingetty.helpLine}
|
||||
[1;32m${config.services.getty.greetingLine}[0m
|
||||
${config.services.getty.helpLine}
|
||||
|
||||
'';
|
||||
};
|
|
@ -11,7 +11,7 @@ with lib;
|
|||
users.users.root.initialHashedPassword = mkOverride 150 "";
|
||||
|
||||
# Some more help text.
|
||||
services.mingetty.helpLine =
|
||||
services.getty.helpLine =
|
||||
''
|
||||
|
||||
Log in as "root" with an empty password.
|
||||
|
|
|
@ -50,7 +50,7 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }:
|
|||
with subtest("Virtual console logout"):
|
||||
machine.send_chars("exit\n")
|
||||
machine.wait_until_fails("pgrep -u alice bash")
|
||||
machine.screenshot("mingetty")
|
||||
machine.screenshot("getty")
|
||||
|
||||
with subtest("Check whether ctrl-alt-delete works"):
|
||||
machine.send_key("ctrl-alt-delete")
|
||||
|
|
Loading…
Reference in a new issue