Skip to content

Commit 78a9367

Browse files
committed
fix deprecated mingetty option
1 parent 9b61692 commit 78a9367

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

share/nixos-shell/nixos-shell.nix

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,16 @@ in {
9696
# Allow the user to login as root without password.
9797
users.extraUsers.root.initialHashedPassword = "";
9898

99-
services.getty.helpLine = ''
100-
Log in as "root" with an empty password.
101-
If you are connect via serial console:
102-
Type Ctrl-a c to switch to the qemu console
103-
and `quit` to stop the VM.
104-
'';
99+
services = let
100+
service = if lib.versionAtLeast (lib.versions.majorMinor lib.version) "20.09" then "getty" else "mingetty";
101+
in {
102+
${service}.helpLine = ''
103+
Log in as "root" with an empty password.
104+
If you are connect via serial console:
105+
Type Ctrl-a c to switch to the qemu console
106+
and `quit` to stop the VM.
107+
'';
108+
};
105109

106110
virtualisation = {
107111
graphics = mkVMDefault false;

0 commit comments

Comments
 (0)