diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index 5343aa9eae99..adab3bf5d06d 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -74,7 +74,7 @@ mount -t tmpfs -o "mode=0755" none /dev mkdir -m 0777 /dev/shm mount -t tmpfs -o "rw,nosuid,nodev" tmpfs /dev/shm mkdir -m 0755 -p /dev/pts -mount -t devpts -o mode=0600 none /dev/pts +mount -t devpts -o mode=0600,gid=@ttyGid@ none /dev/pts [ -e /proc/bus/usb ] && mount -t usbfs none /proc/bus/usb # uml doesn't have usb by default mkdir -m 01777 -p /tmp mkdir -m 0755 -p /var diff --git a/modules/system/boot/stage-2.nix b/modules/system/boot/stage-2.nix index 5c3c3560be32..2e5e2e524dd7 100644 --- a/modules/system/boot/stage-2.nix +++ b/modules/system/boot/stage-2.nix @@ -23,6 +23,7 @@ let src = ./stage-2-init.sh; isExecutable = true; inherit kernel activateConfiguration; + ttyGid = config.ids.gids.tty; upstart = config.system.build.upstart; path = [ coreutils