Serial Console: Difference between revisions
imported>Mic92 No edit summary |
imported>Clerie No edit summary |
||
Line 1: | Line 1: | ||
{{expansion}} | {{expansion}} | ||
== Use serial interface as TTY == | |||
To use a serial device <code>ttyS0</code> as a TTY to log into the device, you have to tell the kernel and you boot loader about the serial configuration. | |||
An example for GRUB bootloader: | |||
boot.kernelParams = [ "console=ttyS0,115200n8" ]; | |||
boot.loader.grub.extraConfig = " | |||
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 | |||
terminal_input serial | |||
terminal_output serial | |||
"; | |||
== Unprivileged access to serial device == | |||
Serial devices under NixOS are created with the group <code>dialout</code> by default. | |||
All users that are part of the group <code>dialout</code> can access serial devices. | |||
Add a user to group <code>dialout</code>: | |||
users.users.<name>.extraGroups = [ "dialout" ]; | |||
== Tips == | == Tips == |