mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
6c3d21aff9
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
9f5051b76c
("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.
27 lines
609 B
Nix
27 lines
609 B
Nix
{ lib, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
imports = [
|
|
../profiles/docker-container.nix # FIXME, shouldn't include something from profiles/
|
|
];
|
|
|
|
# Allow the user to login as root without password.
|
|
users.users.root.initialHashedPassword = mkOverride 150 "";
|
|
|
|
# Some more help text.
|
|
services.getty.helpLine =
|
|
''
|
|
|
|
Log in as "root" with an empty password.
|
|
'';
|
|
|
|
# Containers should be light-weight, so start sshd on demand.
|
|
services.openssh.enable = mkDefault true;
|
|
services.openssh.startWhenNeeded = mkDefault true;
|
|
|
|
# Allow ssh connections
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
}
|