Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cce45c73b9b5
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 57e1a17ad0f1
Choose a head ref
  • 2 commits
  • 8 files changed
  • 2 contributors

Commits on Jan 5, 2021

  1. nixos/getty: rename from services.mingetty

    It's been 8.5 years since NixOS used mingetty, but the option was
    never renamed (despite the file definining the module being renamed in
    9f5051b ("Rename mingetty module to agetty")).
    
    I've chosen to rename it to services.getty here, rather than
    services.agetty, because getty is implemantation-neutral and also the
    name of the unit that is generated.
    alyssais committed Jan 5, 2021
    Copy the full SHA
    6c3d21a View commit details
  2. Merge pull request #108465 from alyssais/getty

    nixos/getty: rename from services.mingetty
    worldofpeace authored Jan 5, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    vbgl Vincent Laporte
    Copy the full SHA
    57e1a17 View commit details
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ in
'';

# Some more help text.
services.mingetty.helpLine =
services.getty.helpLine =
''
Log in as "root" with an empty password. ${
Original file line number Diff line number Diff line change
@@ -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. ${
2 changes: 1 addition & 1 deletion nixos/modules/misc/documentation.nix
Original file line number Diff line number Diff line change
@@ -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."
);
})
2 changes: 1 addition & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions nixos/modules/profiles/installation-device.nix
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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}
'';
};
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/lxc-container.nix
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion nixos/tests/login.nix
Original file line number Diff line number Diff line change
@@ -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")